| java.lang.Object com.caucho.amber.type.Type com.caucho.amber.type.AbstractEnhancedType com.caucho.amber.type.AbstractStatefulType com.caucho.amber.type.RelatedType
All known Subclasses: com.caucho.amber.type.MappedSuperclassType, com.caucho.amber.type.EntityType,
Method Summary | |
public void | addField(AmberField field) Adds a new field. | public void | addListener(ListenerType listener) Adds an entity listener. | public void | addSecondaryTable(Table table) Adds a secondary table. | public void | addSubClass(SubEntityType type) Adds a sub-class. | public Entity | createBean() Creates a new entity for this specific instance type. | public AmberCompletion | createManyToOneCompletion(String name, Entity source, Object newTarget) Returns a completion for the given field. | public void | delete(AmberConnection aConn, Object key) Deletes by the primary key. | public EntityItem | findItem(AmberConnection aConn, ResultSet rs, int index) | public String | generateAutoCreateSQL(Table table) Generates the auto insert sql. | public void | generateCopyLoadObject(JavaWriter out, String dst, String src, int loadGroup) Copy from an object. | public void | generateCopyMergeObject(JavaWriter out, String dst, String src, int loadGroup) Copy from an object. | public void | generateCopyUpdateObject(JavaWriter out, String dst, String src, int updateIndex) Copy from an object. | public String | generateCreateSQL(Table table) Generates the insert sql. | public void | generateDumpRelationships(JavaWriter out, int updateIndex) Checks entity-relationships from an object. | public String | generateFullLoadSelect(String id) Generates the select clause for a load. | public String | generateIdSelect(String id) Generates the select clause for a load. | protected void | generateInsertColumns(Table table, ArrayList<String> columns) | public void | generateInsertSet(JavaWriter out, Table table, String pstmt, String query, String obj) Generates the update sql. | public String | generateKeyLoadSelect(String id) Generates the select clause for a load. | public int | generateLoad(JavaWriter out, String rs, String indexVar, int index) Generates a string to load the field. | public void | generateLoadFromObject(JavaWriter out, String obj) Loads from an object. | public String | generateLoadSelect(String id) Generates the select clause for a load. | public String | generateLoadSelect(Table table, String id) Generates the select clause for a load. | public String | generateLoadSelect(Table table, String id, int loadGroup) Generates the select clause for a load. | public void | generatePostDelete(JavaWriter out) Generates code after the remove. | public int | generatePostLoadSelect(JavaWriter out, int index, int loadGroupIndex) Generates loading code after the basic fields. | public void | generatePreDelete(JavaWriter out) Generates code after the remove. | public void | generateSet(JavaWriter out, String pstmt, String index, String value) Generates a string to set the field. | public String | generateUpdateSQL(long mask) Generates the update sql. | public boolean | generateUpdateSQLComponent(CharBuffer sql, int group, long mask, boolean isFirst) Generates the update sql. | public void | generateUpdateSQLPrefix(CharBuffer sql) Generates the update sql. | public void | generateUpdateSQLSuffix(CharBuffer sql) Generates the update sql. | public long | getCacheTimeout() Returns the cache timeout. | public ArrayList<Column> | getColumns() Returns the columns. | public int | getDefaultLoadGroupIndex() Returns the current load group. | public int | getDirtyIndex() Returns the current dirty group. | public String | getDiscriminatorValue() Sets the discriminator value. | public HashSet<String> | getEagerFieldNames() Gets the EAGER field names. | public boolean | getExcludeDefaultListeners() Gets the exclude default listeners flag. | public boolean | getExcludeSuperclassListeners() Gets the exclude superclass listeners flag. | public AmberField | getField(String name) Returns the field with a given name. | public int | getFlushPriority() Returns the flush priority. | public String | getForeignTypeName() Returns the java type. | public IdGenerator | getGenerator(String name) Sets the named generator. | public boolean | getHasLoadCallback() True if the load lifecycle callback should be generated. | public AmberEntityHome | getHome() Returns the home. | public Id | getId() Returns the id. | public Class | getInstanceClass() Gets the instance class. | public ArrayList<ListenerType> | getListeners() Gets the entity listeners. | public int | getLoadGroupIndex() Returns the current load group. | public Object | getLoadObject(AmberConnection aConn, ResultSet rs, int index) Gets the value. | public int | getMinDirtyIndex() Returns the min dirty group. | public Object | getObject(AmberConnection aConn, ResultSet rs, int index) Gets the value. | public RelatedType | getParentType() Returns the parent type. | public JClass | getProxyClass() Gets the proxy class. | public String | getRootTableName() Returns the root table name. | public RelatedType | getRootType() Returns the root type. | public Table | getSecondaryTable(String name) Gets a secondary table. | public ArrayList<Table> | getSecondaryTables() Gets the secondary tables. | public RelatedType | getSubClass(String discriminator) Gets a sub-class. | public Table | getTable() Returns the table. | public VersionField | getVersionField() Returns the version field. | public boolean | hasDependent() Returns true if and only if it has a
many-to-one, one-to-one or embedded field/property. | public boolean | hasLoadGroup(int loadGroupIndex) Returns true if there's a field with the matching load group. | public void | init() Initialize the entity. | public boolean | isAbstractClass() Returns true if the corresponding class is abstract. | public boolean | isDirtyIndexOwnedByType(int i) Returns true if the load group is owned by this type (not a subtype). | public boolean | isEJBProxy(String typeName) XXX: temp hack. | public boolean | isJoinedSubClass() | public boolean | isLoadGroupOwnedByType(int i) Returns true if the load group is owned by this type (not a subtype). | public boolean | isReadOnly() | public void | nextDefaultLoadGroupIndex() | public int | nextDirtyIndex() | public long | nextGeneratorId(AmberConnection aConn, String name) Gets the named generator. | public int | nextLoadGroupIndex() Returns the next load group. | public void | postLoad(Entity entity) | public void | postPersist(Entity entity) | public void | postRemove(Entity entity) | public void | postUpdate(Entity entity) | public void | prePersist(Entity entity) | public void | preRemove(Entity entity) | public void | preUpdate(Entity entity) | public void | setCacheTimeout(long timeout) Sets the cache timeout. | public void | setDiscriminatorValue(String value) Sets the discriminator value. | public void | setExcludeDefaultListeners(boolean b) Sets the exclude default listeners flag. | public void | setExcludeSuperclassListeners(boolean b) Sets the exclude superclass listeners flag. | public void | setGenerator(String name, IdGenerator gen) Sets the named generator. | public void | setHasDependent(boolean hasDependent) Sets true if and only if it has a
many-to-one, one-to-one or embedded field/property. | public void | setHasLoadCallback(boolean hasCallback) True if the load lifecycle callback should be generated. | public void | setId(Id id) Sets the id. | public void | setJoinedSubClass(boolean isJoinedSubClass) | public void | setProxyClass(JClass proxyClass) Gets the proxy class. | public void | setReadOnly(boolean isReadOnly) | public void | setRootTableName(String rootTableName) Sets the root table name. | public void | setTable(Table table) Sets the table. | public void | setVersionField(VersionField versionField) Sets the version field. | public void | start() Start the entry. | public String | toString() Printable version of the entity. | public void | update(Entity entity) Deletes by the primary key. | public int | updateFlushPriority(ArrayList<EntityType> updatingEntities) Updates global (persistence unit) entity priorities
for flushing. |
_defaultLoadGroupIndex | protected int _defaultLoadGroupIndex(Code) | | |
_dirtyIndex | protected int _dirtyIndex(Code) | | |
_hasLoadCallback | protected boolean _hasLoadCallback(Code) | | |
_loadGroupIndex | protected int _loadGroupIndex(Code) | | |
_minDirtyIndex | protected int _minDirtyIndex(Code) | | |
addSecondaryTable | public void addSecondaryTable(Table table)(Code) | | Adds a secondary table.
|
createBean | public Entity createBean()(Code) | | Creates a new entity for this specific instance type.
|
generateAutoCreateSQL | public String generateAutoCreateSQL(Table table)(Code) | | Generates the auto insert sql.
|
generateCreateSQL | public String generateCreateSQL(Table table)(Code) | | Generates the insert sql.
|
generateDumpRelationships | public void generateDumpRelationships(JavaWriter out, int updateIndex) throws IOException(Code) | | Checks entity-relationships from an object.
|
generateFullLoadSelect | public String generateFullLoadSelect(String id)(Code) | | Generates the select clause for a load.
|
generateIdSelect | public String generateIdSelect(String id)(Code) | | Generates the select clause for a load.
|
generateKeyLoadSelect | public String generateKeyLoadSelect(String id)(Code) | | Generates the select clause for a load.
|
generateLoadSelect | public String generateLoadSelect(String id)(Code) | | Generates the select clause for a load.
|
generateLoadSelect | public String generateLoadSelect(Table table, String id)(Code) | | Generates the select clause for a load.
|
generateLoadSelect | public String generateLoadSelect(Table table, String id, int loadGroup)(Code) | | Generates the select clause for a load.
|
generatePostLoadSelect | public int generatePostLoadSelect(JavaWriter out, int index, int loadGroupIndex) throws IOException(Code) | | Generates loading code after the basic fields.
|
generateUpdateSQL | public String generateUpdateSQL(long mask)(Code) | | Generates the update sql.
|
generateUpdateSQLComponent | public boolean generateUpdateSQLComponent(CharBuffer sql, int group, long mask, boolean isFirst)(Code) | | Generates the update sql.
Parameters: sql - the partially built sql Parameters: group - the dirty group Parameters: mask - the group's mask Parameters: isFirst - marks the first set group |
generateUpdateSQLPrefix | public void generateUpdateSQLPrefix(CharBuffer sql)(Code) | | Generates the update sql.
|
generateUpdateSQLSuffix | public void generateUpdateSQLSuffix(CharBuffer sql)(Code) | | Generates the update sql.
|
getCacheTimeout | public long getCacheTimeout()(Code) | | Returns the cache timeout.
|
getDefaultLoadGroupIndex | public int getDefaultLoadGroupIndex()(Code) | | Returns the current load group.
|
getDirtyIndex | public int getDirtyIndex()(Code) | | Returns the current dirty group.
|
getDiscriminatorValue | public String getDiscriminatorValue()(Code) | | Sets the discriminator value.
|
getEagerFieldNames | public HashSet<String> getEagerFieldNames()(Code) | | Gets the EAGER field names.
|
getExcludeDefaultListeners | public boolean getExcludeDefaultListeners()(Code) | | Gets the exclude default listeners flag.
|
getExcludeSuperclassListeners | public boolean getExcludeSuperclassListeners()(Code) | | Gets the exclude superclass listeners flag.
|
getFlushPriority | public int getFlushPriority()(Code) | | Returns the flush priority.
|
getForeignTypeName | public String getForeignTypeName()(Code) | | Returns the java type.
|
getHasLoadCallback | public boolean getHasLoadCallback()(Code) | | True if the load lifecycle callback should be generated.
|
getId | public Id getId()(Code) | | Returns the id.
|
getInstanceClass | public Class getInstanceClass()(Code) | | Gets the instance class.
|
getLoadGroupIndex | public int getLoadGroupIndex()(Code) | | Returns the current load group.
|
getMinDirtyIndex | public int getMinDirtyIndex()(Code) | | Returns the min dirty group.
|
getProxyClass | public JClass getProxyClass()(Code) | | Gets the proxy class.
|
getRootTableName | public String getRootTableName()(Code) | | Returns the root table name.
|
getSecondaryTable | public Table getSecondaryTable(String name)(Code) | | Gets a secondary table.
|
getTable | public Table getTable()(Code) | | Returns the table.
|
hasDependent | public boolean hasDependent()(Code) | | Returns true if and only if it has a
many-to-one, one-to-one or embedded field/property.
|
hasLoadGroup | public boolean hasLoadGroup(int loadGroupIndex)(Code) | | Returns true if there's a field with the matching load group.
|
init | public void init() throws ConfigException(Code) | | Initialize the entity.
|
isAbstractClass | public boolean isAbstractClass()(Code) | | Returns true if the corresponding class is abstract.
|
isDirtyIndexOwnedByType | public boolean isDirtyIndexOwnedByType(int i)(Code) | | Returns true if the load group is owned by this type (not a subtype).
|
isEJBProxy | public boolean isEJBProxy(String typeName)(Code) | | XXX: temp hack.
|
isJoinedSubClass | public boolean isJoinedSubClass()(Code) | | Set true for joined-subclass
|
isLoadGroupOwnedByType | public boolean isLoadGroupOwnedByType(int i)(Code) | | Returns true if the load group is owned by this type (not a subtype).
|
isReadOnly | public boolean isReadOnly()(Code) | | Returns true if read-only
|
nextDefaultLoadGroupIndex | public void nextDefaultLoadGroupIndex()(Code) | | Sets the next default loadGroupIndex
|
nextDirtyIndex | public int nextDirtyIndex()(Code) | | Returns the next dirty index
|
nextLoadGroupIndex | public int nextLoadGroupIndex()(Code) | | Returns the next load group.
|
postLoad | public void postLoad(Entity entity)(Code) | | Callbacks after an entity is loaded
|
postPersist | public void postPersist(Entity entity)(Code) | | Callbacks after an entity is persisted
|
postRemove | public void postRemove(Entity entity)(Code) | | Callbacks after an entity is removeed
|
postUpdate | public void postUpdate(Entity entity)(Code) | | Callbacks after an entity is updated
|
prePersist | public void prePersist(Entity entity)(Code) | | Callbacks before an entity is persisted
|
preRemove | public void preRemove(Entity entity)(Code) | | Callbacks before an entity is removeed
|
preUpdate | public void preUpdate(Entity entity)(Code) | | Callbacks before an entity is updateed
|
setCacheTimeout | public void setCacheTimeout(long timeout)(Code) | | Sets the cache timeout.
|
setDiscriminatorValue | public void setDiscriminatorValue(String value)(Code) | | Sets the discriminator value.
|
setExcludeDefaultListeners | public void setExcludeDefaultListeners(boolean b)(Code) | | Sets the exclude default listeners flag.
|
setExcludeSuperclassListeners | public void setExcludeSuperclassListeners(boolean b)(Code) | | Sets the exclude superclass listeners flag.
|
setHasDependent | public void setHasDependent(boolean hasDependent)(Code) | | Sets true if and only if it has a
many-to-one, one-to-one or embedded field/property.
|
setHasLoadCallback | public void setHasLoadCallback(boolean hasCallback)(Code) | | True if the load lifecycle callback should be generated.
|
setId | public void setId(Id id)(Code) | | Sets the id.
|
setJoinedSubClass | public void setJoinedSubClass(boolean isJoinedSubClass)(Code) | | Set true for joined-subclass
|
setProxyClass | public void setProxyClass(JClass proxyClass)(Code) | | Gets the proxy class.
|
setReadOnly | public void setReadOnly(boolean isReadOnly)(Code) | | Sets true if read-only
|
setRootTableName | public void setRootTableName(String rootTableName)(Code) | | Sets the root table name.
|
setTable | public void setTable(Table table)(Code) | | Sets the table.
|
setVersionField | public void setVersionField(VersionField versionField)(Code) | | Sets the version field.
|
start | public void start() throws ConfigException(Code) | | Start the entry.
|
toString | public String toString()(Code) | | Printable version of the entity.
|
updateFlushPriority | public int updateFlushPriority(ArrayList<EntityType> updatingEntities)(Code) | | Updates global (persistence unit) entity priorities
for flushing.
|
Methods inherited from com.caucho.amber.type.AbstractStatefulType | public void addCompletionField(String name)(Code)(Java Doc) public void addDependency(Class cl)(Code)(Java Doc) public void addDependency(JClass cl)(Code)(Java Doc) public void addDependency(PersistentDependency depend)(Code)(Java Doc) public void addField(AmberField field)(Code)(Java Doc) public void addMappedSuperclassField(AmberField field)(Code)(Java Doc) public boolean containsCompletionField(String completionField)(Code)(Java Doc) public String generateCastFromObject(String value)(Code)(Java Doc) public void generateExpire(JavaWriter out) throws IOException(Code)(Java Doc) public void generateInvalidateForeign(JavaWriter out) throws IOException(Code)(Java Doc) public int generateLoad(JavaWriter out, String rs, String indexVar, int index, int loadGroupIndex, ArrayList<AmberField> overriddenFields) throws IOException(Code)(Java Doc) abstract public String generateLoadSelect(Table table, String id)(Code)(Java Doc) public String generateLoadSelect(Table table, String id, int loadGroup)(Code)(Java Doc) public String generateLoadSelect(Table table, String id, int loadGroup, boolean hasSelect)(Code)(Java Doc) public long getCreateLoadMask(int group)(Code)(Java Doc) public ArrayList<PersistentDependency> getDependencies()(Code)(Java Doc) public Column getDiscriminator()(Code)(Java Doc) public AmberField getField(String name)(Code)(Java Doc) public static JField getField(JClass cl, String name)(Code)(Java Doc) public ArrayList<AmberField> getFields()(Code)(Java Doc) public JMethod getGetter(String name)(Code)(Java Doc) public static JMethod getGetter(JClass cl, String name)(Code)(Java Doc) public String getJavaTypeName()(Code)(Java Doc) public AmberField getMappedSuperclassField(String name)(Code)(Java Doc) public ArrayList<AmberField> getMappedSuperclassFields()(Code)(Java Doc) public static JMethod getSetter(JClass cl, String name)(Code)(Java Doc) public void init() throws ConfigException(Code)(Java Doc) public boolean isEmbeddable()(Code)(Java Doc) public boolean isFieldAccess()(Code)(Java Doc) public void removeAllCompletionFields()(Code)(Java Doc) public void setBeanClass(JClass beanClass)(Code)(Java Doc) public void setDiscriminator(Column discriminator)(Code)(Java Doc) public void setFieldAccess(boolean isFieldAccess)(Code)(Java Doc) public boolean startConfigure()(Code)(Java Doc) public String toString()(Code)(Java Doc)
|
Methods inherited from com.caucho.amber.type.Type | public EntityItem findItem(AmberConnection aConn, ResultSet rs, int index) throws SQLException(Code)(Java Doc) public String fromObject(String value)(Code)(Java Doc) public String generateCastFromObject(String value)(Code)(Java Doc) public String generateCreateColumnSQL(AmberPersistenceUnit manager, int length, int precision, int scale)(Code)(Java Doc) public String generateEquals(String a, String b)(Code)(Java Doc) public String generateIncrementVersion(String value) throws IOException(Code)(Java Doc) public String generateIsNull(String value)(Code)(Java Doc) public int generateLoad(JavaWriter out, String rs, String indexVar, int index) throws IOException(Code)(Java Doc) public int generateLoad(JavaWriter out, String rs, String indexVar, int index, JClass targetType) throws IOException(Code)(Java Doc) public int generateLoadForeign(JavaWriter out, String rs, String indexVar, int index) throws IOException(Code)(Java Doc) public String generateNull()(Code)(Java Doc) public void generateSet(JavaWriter out, String pstmt, String index, String value) throws IOException(Code)(Java Doc) public void generateSetNull(JavaWriter out, String pstmt, String index) throws IOException(Code)(Java Doc) public void generateSetVersion(JavaWriter out, String pstmt, String index, String value) throws IOException(Code)(Java Doc) public int getColumnCount()(Code)(Java Doc) public Type getForeignType()(Code)(Java Doc) public String getForeignTypeName()(Code)(Java Doc) public String getJavaTypeName()(Code)(Java Doc) abstract public String getName()(Code)(Java Doc) public Object getObject(ResultSet rs, int index) throws SQLException(Code)(Java Doc) public Object getObject(AmberConnection aConn, ResultSet rs, int index) throws SQLException(Code)(Java Doc) public void init() throws ConfigException(Code)(Java Doc) public boolean isAssignableTo(JClass javaType)(Code)(Java Doc) public boolean isAutoIncrement()(Code)(Java Doc) public boolean isBoolean()(Code)(Java Doc) public boolean isNumeric()(Code)(Java Doc) public void setParameter(PreparedStatement pstmt, int index, Object value) throws SQLException(Code)(Java Doc) public String toObject(String value)(Code)(Java Doc) public Object toObject(long value)(Code)(Java Doc)
|
|
|