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.booleanReturnstrueif this model instance was retrieved from the entity cache.booleanDeprecated.As of Athanasius (7.3.x), with no direct replacementbooleanReturnstrueif this model instance is escaped.booleanDeprecated.As of Athanasius (7.3.x), with no direct replacementbooleanisNew()Returnstrueif this model instance does not yet exist in the database.voidReset all original fields to current values.voidsetCachedModel(boolean cachedModel) Sets whether this model instance was retrieved from the entity cache.voidsetExpandoBridgeAttributes(ExpandoBridge expandoBridge) voidsetExpandoBridgeAttributes(BaseModel<?> baseModel) voidsetExpandoBridgeAttributes(ServiceContext serviceContext) Sets the expando bridge attributes for this model instance to the attributes stored in the service context.voidsetModelAttributes(Map<String, Object> attributes) voidsetNew(boolean n) Sets whether this model instance does not yet exist in the database.voidsetPrimaryKeyObj(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, getModelClassNameMethods 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:
getExpandoBridgein interfaceClassedModel- Returns:
- the expando bridge for this model instance
-
getModelAttributes
-
getPrimaryKeyObj
Serializable getPrimaryKeyObj()Returns the primary key of this model instance.- Specified by:
getPrimaryKeyObjin interfaceClassedModel- Returns:
- the primary key of this model instance
-
isCachedModel
boolean isCachedModel()Returnstrueif this model instance was retrieved from the entity cache.- Returns:
trueif this model instance was retrieved from the entity cache;falseotherwise- See Also:
-
isEntityCacheEnabled
Deprecated.As of Athanasius (7.3.x), with no direct replacementReturnstrueif this model's entity cache is enabled.- Returns:
trueif this model's entity cache is enabled;falseotherwise
-
isEscapedModel
boolean isEscapedModel()Returnstrueif this model instance is escaped.- Returns:
trueif this model instance is escaped;falseotherwise
-
isFinderCacheEnabled
Deprecated.As of Athanasius (7.3.x), with no direct replacementReturnstrueif this model's finder cache is enabled.- Returns:
trueif this model's finder cache is enabled;falseotherwise
-
isNew
boolean isNew()Returnstrueif this model instance does not yet exist in the database.- Returns:
trueif this model instance does not yet exist in the database;falseotherwise
-
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:
setPrimaryKeyObjin 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()
-