Class BaseModelImpl<T>

Object
com.liferay.portal.kernel.model.impl.BaseModelImpl<T>
All Implemented Interfaces:
BaseModel<T>, ClassedModel, Serializable, Cloneable, Comparable<T>

@ProviderType public abstract class BaseModelImpl<T> extends Object implements BaseModel<T>
The base implementation for all model classes. This class should never need to be used directly.
Author:
Brian Wing Shun Chan
See Also:
  • Constructor Details

    • BaseModelImpl

      public BaseModelImpl()
  • Method Details

    • clone

      public abstract Object clone()
      Description copied from interface: BaseModel
      Creates a shallow clone of this model instance.
      Specified by:
      clone in interface BaseModel<T>
      Overrides:
      clone in class Object
      Returns:
      the shallow clone of this model instance
    • getExpandoBridge

      public ExpandoBridge getExpandoBridge()
      Description copied from interface: BaseModel
      Returns the expando bridge for this model instance.
      Specified by:
      getExpandoBridge in interface BaseModel<T>
      Specified by:
      getExpandoBridge in interface ClassedModel
      Returns:
      the expando bridge for this model instance
    • getModelAttributes

      public Map<String,Object> getModelAttributes()
      Specified by:
      getModelAttributes in interface BaseModel<T>
    • isCachedModel

      public boolean isCachedModel()
      Description copied from interface: BaseModel
      Returns true if this model instance was retrieved from the entity cache.
      Specified by:
      isCachedModel in interface BaseModel<T>
      Returns:
      true if this model instance was retrieved from the entity cache; false otherwise
      See Also:
    • isEscapedModel

      public boolean isEscapedModel()
      Description copied from interface: BaseModel
      Returns true if this model instance is escaped.
      Specified by:
      isEscapedModel in interface BaseModel<T>
      Returns:
      true if this model instance is escaped; false otherwise
    • isNew

      public boolean isNew()
      Description copied from interface: BaseModel
      Returns true if this model instance does not yet exist in the database.
      Specified by:
      isNew in interface BaseModel<T>
      Returns:
      true if this model instance does not yet exist in the database; false otherwise
    • resetOriginalValues

      public void resetOriginalValues()
      Description copied from interface: BaseModel
      Reset all original fields to current values.
      Specified by:
      resetOriginalValues in interface BaseModel<T>
    • setCachedModel

      public void setCachedModel(boolean cachedModel)
      Description copied from interface: BaseModel
      Sets whether this model instance was retrieved from the entity cache.
      Specified by:
      setCachedModel in interface BaseModel<T>
      Parameters:
      cachedModel - whether this model instance was retrieved from the entity cache
      See Also:
    • setExpandoBridgeAttributes

      public void setExpandoBridgeAttributes(BaseModel<?> baseModel)
      Specified by:
      setExpandoBridgeAttributes in interface BaseModel<T>
    • setExpandoBridgeAttributes

      public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge)
      Specified by:
      setExpandoBridgeAttributes in interface BaseModel<T>
    • setExpandoBridgeAttributes

      public void setExpandoBridgeAttributes(ServiceContext serviceContext)
      Description copied from interface: BaseModel
      Sets the expando bridge attributes for this model instance to the attributes stored in the service context.
      Specified by:
      setExpandoBridgeAttributes in interface BaseModel<T>
      Parameters:
      serviceContext - the service context to be applied
      See Also:
    • setModelAttributes

      public void setModelAttributes(Map<String,Object> attributes)
      Specified by:
      setModelAttributes in interface BaseModel<T>
    • setNew

      public void setNew(boolean n)
      Description copied from interface: BaseModel
      Sets whether this model instance does not yet exist in the database.
      Specified by:
      setNew in interface BaseModel<T>
      Parameters:
      n - whether this model instance does not yet exist in the database
    • toCacheModel

      public CacheModel<T> toCacheModel()
      Description copied from interface: BaseModel
      Returns a cache model object for this entity used by entity cache.
      Specified by:
      toCacheModel in interface BaseModel<T>
      Returns:
      the cache model object
    • toEscapedModel

      public T toEscapedModel()
      Description copied from interface: BaseModel
      Returns a copy of this entity as an escaped model instance by wrapping it with an AutoEscapeBeanHandler.
      Specified by:
      toEscapedModel in interface BaseModel<T>
      Returns:
      the escaped model instance
      See Also:
    • toUnescapedModel

      public T toUnescapedModel()
      Specified by:
      toUnescapedModel in interface BaseModel<T>
    • getLocale

      protected Locale getLocale(String languageId)