Package com.liferay.portal.kernel.model
Interface BaseModel<T>
- All Superinterfaces:
ClassedModel
,Cloneable
,Comparable<T>
,Serializable
- All Known Subinterfaces:
Address
,AddressModel
,AnnouncementsDelivery
,AnnouncementsDeliveryModel
,AnnouncementsEntry
,AnnouncementsEntryModel
,AnnouncementsFlag
,AnnouncementsFlagModel
,AssetCategory
,AssetCategoryModel
,AssetEntry
,AssetEntryModel
,AssetTag
,AssetTagModel
,AssetVocabulary
,AssetVocabularyModel
,BrowserTracker
,BrowserTrackerModel
,ClassName
,ClassNameModel
,Company
,CompanyInfo
,CompanyInfoModel
,CompanyModel
,Contact
,ContactModel
,Counter
,CounterModel
,Country
,CountryLocalization
,CountryLocalizationModel
,CountryModel
,CTModel<T>
,DLFileEntry
,DLFileEntryMetadata
,DLFileEntryMetadataModel
,DLFileEntryModel
,DLFileEntryType
,DLFileEntryTypeModel
,DLFileShortcut
,DLFileShortcutModel
,DLFileVersion
,DLFileVersionModel
,DLFolder
,DLFolderModel
,EmailAddress
,EmailAddressModel
,ExpandoColumn
,ExpandoColumnModel
,ExpandoRow
,ExpandoRowModel
,ExpandoTable
,ExpandoTableModel
,ExpandoValue
,ExpandoValueModel
,ExportImportConfiguration
,ExportImportConfigurationModel
,Group
,GroupModel
,Image
,ImageModel
,Layout
,LayoutBranch
,LayoutBranchModel
,LayoutFriendlyURL
,LayoutFriendlyURLModel
,LayoutModel
,LayoutPrototype
,LayoutPrototypeModel
,LayoutRevision
,LayoutRevisionModel
,LayoutSet
,LayoutSetBranch
,LayoutSetBranchModel
,LayoutSetModel
,LayoutSetPrototype
,LayoutSetPrototypeModel
,ListType
,ListTypeModel
,MembershipRequest
,MembershipRequestModel
,Organization
,OrganizationModel
,OrgLabor
,OrgLaborModel
,PasswordPolicy
,PasswordPolicyModel
,PasswordPolicyRel
,PasswordPolicyRelModel
,PasswordTracker
,PasswordTrackerModel
,Phone
,PhoneModel
,PluginSetting
,PluginSettingModel
,PortalPreferences
,PortalPreferencesModel
,PortalPreferenceValue
,PortalPreferenceValueModel
,Portlet
,PortletItem
,PortletItemModel
,PortletModel
,PortletPreferences
,PortletPreferencesModel
,PortletPreferenceValue
,PortletPreferenceValueModel
,RatingsEntry
,RatingsEntryModel
,RatingsStats
,RatingsStatsModel
,RecentLayoutBranch
,RecentLayoutBranchModel
,RecentLayoutRevision
,RecentLayoutRevisionModel
,RecentLayoutSetBranch
,RecentLayoutSetBranchModel
,Region
,RegionLocalization
,RegionLocalizationModel
,RegionModel
,Release
,ReleaseModel
,RememberMeToken
,RememberMeTokenModel
,Repository
,RepositoryEntry
,RepositoryEntryModel
,RepositoryModel
,ResourceAction
,ResourceActionModel
,ResourcePermission
,ResourcePermissionModel
,Role
,RoleModel
,ServiceComponent
,ServiceComponentModel
,SocialActivity
,SocialActivityAchievement
,SocialActivityAchievementModel
,SocialActivityCounter
,SocialActivityCounterModel
,SocialActivityLimit
,SocialActivityLimitModel
,SocialActivityModel
,SocialActivitySet
,SocialActivitySetModel
,SocialActivitySetting
,SocialActivitySettingModel
,SocialRelation
,SocialRelationModel
,SocialRequest
,SocialRequestModel
,StagedExpandoColumn
,StagedGroupedWorkflowDefinitionLink
,Subscription
,SubscriptionModel
,SystemEvent
,SystemEventModel
,Team
,TeamModel
,Ticket
,TicketModel
,TrashEntry
,TrashEntryModel
,User
,UserGroup
,UserGroupGroupRole
,UserGroupGroupRoleModel
,UserGroupModel
,UserGroupRole
,UserGroupRoleModel
,UserIdMapper
,UserIdMapperModel
,UserModel
,UserNotificationDelivery
,UserNotificationDeliveryModel
,UserNotificationEvent
,UserNotificationEventModel
,UserTracker
,UserTrackerModel
,UserTrackerPath
,UserTrackerPathModel
,VirtualHost
,VirtualHostModel
,WebDAVProps
,WebDAVPropsModel
,Website
,WebsiteModel
,WorkflowDefinitionLink
,WorkflowDefinitionLinkModel
,WorkflowInstanceLink
,WorkflowInstanceLinkModel
- All Known Implementing Classes:
AddressWrapper
,AnnouncementsDeliveryWrapper
,AnnouncementsEntryWrapper
,AnnouncementsFlagWrapper
,AssetCategoryWrapper
,AssetEntryWrapper
,AssetTagWrapper
,AssetVocabularyWrapper
,BaseModelImpl
,BaseModelWrapper
,BrowserTrackerWrapper
,ClassNameWrapper
,CompanyInfoWrapper
,CompanyWrapper
,ContactWrapper
,CounterWrapper
,CountryLocalizationWrapper
,CountryWrapper
,DLFileEntryMetadataWrapper
,DLFileEntryTypeWrapper
,DLFileEntryWrapper
,DLFileShortcutWrapper
,DLFileVersionWrapper
,DLFolderWrapper
,EmailAddressWrapper
,ExpandoColumnWrapper
,ExpandoRowWrapper
,ExpandoTableWrapper
,ExpandoValueWrapper
,ExportImportConfigurationWrapper
,GroupWrapper
,ImageWrapper
,LayoutBranchWrapper
,LayoutFriendlyURLWrapper
,LayoutPrototypeWrapper
,LayoutRevisionWrapper
,LayoutSetBranchWrapper
,LayoutSetPrototypeWrapper
,LayoutSetWrapper
,LayoutWrapper
,ListTypeWrapper
,MembershipRequestWrapper
,OrganizationWrapper
,OrgLaborWrapper
,PasswordPolicyRelWrapper
,PasswordPolicyWrapper
,PasswordTrackerWrapper
,PhoneWrapper
,PluginSettingWrapper
,PortalPreferencesWrapper
,PortalPreferenceValueWrapper
,PortletItemWrapper
,PortletPreferencesWrapper
,PortletPreferenceValueWrapper
,PortletWrapper
,RatingsEntryWrapper
,RatingsStatsWrapper
,RecentLayoutBranchWrapper
,RecentLayoutRevisionWrapper
,RecentLayoutSetBranchWrapper
,RegionLocalizationWrapper
,RegionWrapper
,ReleaseWrapper
,RememberMeTokenWrapper
,RepositoryEntryWrapper
,RepositoryWrapper
,ResourceActionWrapper
,ResourcePermissionWrapper
,RoleWrapper
,ServiceComponentWrapper
,SocialActivityAchievementWrapper
,SocialActivityCounterWrapper
,SocialActivityLimitWrapper
,SocialActivitySettingWrapper
,SocialActivitySetWrapper
,SocialActivityWrapper
,SocialRelationWrapper
,SocialRequestWrapper
,SubscriptionWrapper
,SystemEventWrapper
,TeamWrapper
,TicketWrapper
,TrashEntryWrapper
,UserGroupGroupRoleWrapper
,UserGroupRoleWrapper
,UserGroupWrapper
,UserIdMapperWrapper
,UserNotificationDeliveryWrapper
,UserNotificationEventWrapper
,UserTrackerPathWrapper
,UserTrackerWrapper
,UserWrapper
,VirtualHostWrapper
,VirtualLayout
,WebDAVPropsWrapper
,WebsiteWrapper
,WorkflowDefinitionLinkWrapper
,WorkflowInstanceLinkWrapper
The base interface for all model classes. This interface should never need to
be used directly.
- Author:
- Brian Wing Shun Chan
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates a shallow clone of this model instance.default Map<String,
BiConsumer<T, Object>> Returns the expando bridge for this model instance.Returns the primary key of this model instance.boolean
Returnstrue
if this model instance was retrieved from the entity cache.boolean
Deprecated.As of Athanasius (7.3.x), with no direct replacementboolean
Returnstrue
if this model instance is escaped.boolean
Deprecated.As of Athanasius (7.3.x), with no direct replacementboolean
isNew()
Returnstrue
if this model instance does not yet exist in the database.void
Reset all original fields to current values.void
setCachedModel
(boolean cachedModel) Sets whether this model instance was retrieved from the entity cache.void
setExpandoBridgeAttributes
(ExpandoBridge expandoBridge) void
setExpandoBridgeAttributes
(BaseModel<?> baseModel) void
setExpandoBridgeAttributes
(ServiceContext serviceContext) Sets the expando bridge attributes for this model instance to the attributes stored in the service context.void
setModelAttributes
(Map<String, Object> attributes) void
setNew
(boolean n) Sets whether this model instance does not yet exist in the database.void
setPrimaryKeyObj
(Serializable primaryKeyObj) Sets the primary key of this model instance.Returns a cache model object for this entity used by entity cache.Returns a copy of this entity as an escaped model instance by wrapping it with anAutoEscapeBeanHandler
.Methods inherited from interface com.liferay.portal.kernel.model.ClassedModel
getModelClass, getModelClassName
Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
clone
Object clone()Creates a shallow clone of this model instance.- Returns:
- the shallow clone of this model instance
-
cloneWithOriginalValues
T cloneWithOriginalValues() -
getAttributeGetterFunctions
-
getAttributeSetterBiConsumers
-
getExpandoBridge
ExpandoBridge getExpandoBridge()Returns the expando bridge for this model instance.- Specified by:
getExpandoBridge
in interfaceClassedModel
- Returns:
- the expando bridge for this model instance
-
getModelAttributes
-
getPrimaryKeyObj
Serializable getPrimaryKeyObj()Returns the primary key of this model instance.- Specified by:
getPrimaryKeyObj
in interfaceClassedModel
- Returns:
- the primary key of this model instance
-
isCachedModel
boolean isCachedModel()Returnstrue
if this model instance was retrieved from the entity cache.- Returns:
true
if this model instance was retrieved from the entity cache;false
otherwise- See Also:
-
isEntityCacheEnabled
Deprecated.As of Athanasius (7.3.x), with no direct replacementReturnstrue
if this model's entity cache is enabled.- Returns:
true
if this model's entity cache is enabled;false
otherwise
-
isEscapedModel
boolean isEscapedModel()Returnstrue
if this model instance is escaped.- Returns:
true
if this model instance is escaped;false
otherwise
-
isFinderCacheEnabled
Deprecated.As of Athanasius (7.3.x), with no direct replacementReturnstrue
if this model's finder cache is enabled.- Returns:
true
if this model's finder cache is enabled;false
otherwise
-
isNew
boolean isNew()Returnstrue
if this model instance does not yet exist in the database.- Returns:
true
if this model instance does not yet exist in the database;false
otherwise
-
resetOriginalValues
void resetOriginalValues()Reset all original fields to current values. -
setCachedModel
void setCachedModel(boolean cachedModel) Sets whether this model instance was retrieved from the entity cache.- Parameters:
cachedModel
- whether this model instance was retrieved from the entity cache- See Also:
-
setExpandoBridgeAttributes
-
setExpandoBridgeAttributes
-
setExpandoBridgeAttributes
Sets the expando bridge attributes for this model instance to the attributes stored in the service context.- Parameters:
serviceContext
- the service context to be applied- See Also:
-
setModelAttributes
-
setNew
void setNew(boolean n) Sets whether this model instance does not yet exist in the database.- Parameters:
n
- whether this model instance does not yet exist in the database
-
setPrimaryKeyObj
Sets the primary key of this model instance.- Specified by:
setPrimaryKeyObj
in interfaceClassedModel
- Parameters:
primaryKeyObj
- the primary key of this model instance
-
toCacheModel
CacheModel<T> toCacheModel()Returns a cache model object for this entity used by entity cache.- Returns:
- the cache model object
-
toEscapedModel
T toEscapedModel()Returns a copy of this entity as an escaped model instance by wrapping it with anAutoEscapeBeanHandler
.- Returns:
- the escaped model instance
- See Also:
-
toUnescapedModel
T toUnescapedModel()
-