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

public interface BaseModel<T> extends ClassedModel, Cloneable, Comparable<T>, Serializable
The base interface for all model classes. This interface should never need to be used directly.
Author:
Brian Wing Shun Chan
See Also:
  • 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

      default Map<String,Function<T,Object>> getAttributeGetterFunctions()
    • getAttributeSetterBiConsumers

      default Map<String,BiConsumer<T,Object>> getAttributeSetterBiConsumers()
    • getExpandoBridge

      ExpandoBridge getExpandoBridge()
      Returns the expando bridge for this model instance.
      Specified by:
      getExpandoBridge in interface ClassedModel
      Returns:
      the expando bridge for this model instance
    • getModelAttributes

      Map<String,Object> getModelAttributes()
    • getPrimaryKeyObj

      Serializable getPrimaryKeyObj()
      Returns the primary key of this model instance.
      Specified by:
      getPrimaryKeyObj in interface ClassedModel
      Returns:
      the primary key of this model instance
    • isCachedModel

      boolean isCachedModel()
      Returns true 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 boolean isEntityCacheEnabled()
      Deprecated.
      As of Athanasius (7.3.x), with no direct replacement
      Returns true if this model's entity cache is enabled.
      Returns:
      true if this model's entity cache is enabled; false otherwise
    • isEscapedModel

      boolean isEscapedModel()
      Returns true if this model instance is escaped.
      Returns:
      true if this model instance is escaped; false otherwise
    • isFinderCacheEnabled

      @Deprecated boolean isFinderCacheEnabled()
      Deprecated.
      As of Athanasius (7.3.x), with no direct replacement
      Returns true if this model's finder cache is enabled.
      Returns:
      true if this model's finder cache is enabled; false otherwise
    • isNew

      boolean isNew()
      Returns true 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

      void setExpandoBridgeAttributes(BaseModel<?> baseModel)
    • setExpandoBridgeAttributes

      void setExpandoBridgeAttributes(ExpandoBridge expandoBridge)
    • setExpandoBridgeAttributes

      void setExpandoBridgeAttributes(ServiceContext serviceContext)
      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

      void setModelAttributes(Map<String,Object> attributes)
    • 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

      void setPrimaryKeyObj(Serializable primaryKeyObj)
      Sets the primary key of this model instance.
      Specified by:
      setPrimaryKeyObj in interface ClassedModel
      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 an AutoEscapeBeanHandler.
      Returns:
      the escaped model instance
      See Also:
    • toUnescapedModel

      T toUnescapedModel()