Class BaseEntity

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String ID_PROPERTY
      Note there may be no corresponding id property in the database.
      • Fields inherited from class org.apache.cayenne.CayenneDataObject

        values
      • Fields inherited from class org.apache.cayenne.BaseDataObject

        snapshotVersion
      • Fields inherited from class org.apache.cayenne.PersistentObject

        objectContext, objectId, persistenceState
      • Fields inherited from interface org.apache.cayenne.DataObject

        DEFAULT_VERSION
    • Constructor Summary

      Constructors 
      Constructor Description
      BaseEntity()  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected void appendProperties​(StringBuffer buffer)  
      Long getId()
      Return the surrogate primary key of the object.
      Map getValuesMap()
      Deprecated.
      this method appears to not work when the entity is hollow - an empty map is returned
      boolean isNew()
      Return true if the object is new or transient object.
      void setId​(Long id)
      Set the surrogate primary key of the object.
      String toString()  
      • Methods inherited from class org.apache.cayenne.CayenneDataObject

        makePath, readPropertyDirectly, readState, setPersistenceState, writePropertyDirectly, writeState
      • Methods inherited from class org.apache.cayenne.BaseDataObject

        addToManyTarget, beforePropertyRead, beforePropertyWrite, getSnapshotVersion, readNestedProperty, readProperty, readSerialized, removeToManyTarget, setObjectContext, setReverseRelationship, setSnapshotVersion, setToManyTarget, setToOneTarget, toStringBuffer, unsetReverseRelationship, validateForDelete, validateForInsert, validateForSave, validateForUpdate, willConnect, writeProperty, writeSerialized
      • Methods inherited from class org.apache.cayenne.PersistentObject

        getMapKey, getObjectContext, getObjectId, getPersistenceState, setObjectId
      • Methods inherited from interface org.apache.cayenne.Persistent

        getObjectContext, getObjectId, getPersistenceState, setObjectContext, setObjectId, setPersistenceState
    • Field Detail

      • ID_PROPERTY

        public static final String ID_PROPERTY
        Note there may be no corresponding id property in the database.
        See Also:
        Constant Field Values
    • Constructor Detail

      • BaseEntity

        public BaseEntity()
    • Method Detail

      • getId

        public Long getId()
        Return the surrogate primary key of the object.
        Specified by:
        getId in interface IEntity
        Returns:
        the surrogate primary key of the object
        See Also:
        IEntity.getId()
      • setId

        public void setId​(Long id)
        Set the surrogate primary key of the object.
        Specified by:
        setId in interface IEntity
        Parameters:
        id - the surrogate primary key of the object to set
        See Also:
        IEntity.setId(Long)
      • isNew

        public boolean isNew()
        Return true if the object is new or transient object.
        Specified by:
        isNew in interface IEntity
        Returns:
        true if the object is new or transient object
        See Also:
        IEntity.isNew()
      • getValuesMap

        public Map getValuesMap()
        Deprecated.
        this method appears to not work when the entity is hollow - an empty map is returned
        Return map of object properties values for query by example.
        Returns:
        a map of object properties
      • toString

        public String toString()
        Overrides:
        toString in class org.apache.cayenne.BaseDataObject
      • appendProperties

        protected void appendProperties​(StringBuffer buffer)
        Overrides:
        appendProperties in class org.apache.cayenne.CayenneDataObject