org.caleigo.core.meta
Class CustomEntityDescriptor

java.lang.Object
  extended byorg.caleigo.core.AbstractEntityDescriptor
      extended byorg.caleigo.core.meta.CustomEntityDescriptor
All Implemented Interfaces:
IEntityDescriptor, java.io.Serializable

class CustomEntityDescriptor
extends AbstractEntityDescriptor

Version:
1.0
Author:
Mattias Hagstrand

Nested Class Summary
protected static class CustomEntityDescriptor.Dezerializer
           
 
Nested classes inherited from class org.caleigo.core.AbstractEntityDescriptor
AbstractEntityDescriptor.DeleteEntityAction, AbstractEntityDescriptor.StoreEntityAction
 
Field Summary
 
Fields inherited from class org.caleigo.core.AbstractEntityDescriptor
CACHEABLE, CREATABLE, DELETABLE, EDITABLE, LISTABLE, SCANABLE, SELECTABLE
 
Fields inherited from interface org.caleigo.core.IEntityDescriptor
CUSTOM_ENTITY, DELETE_ACTION, LINK_ENTITY, MASTER_ENTITY, NO_TIME_LIMIT, SLAVE_ENTITY, STATIC_ENTITY, STORE_ACTION
 
Constructor Summary
CustomEntityDescriptor(java.lang.String codeName, java.lang.String sourceName, java.lang.String displayName, IFieldDescriptor[] fields, int entityType, int flags, int cacheTime, IEntityRelation[] relations)
           
 
Method Summary
 IEntity createEntity()
          Creates an entity with of the type described by this descriptor and loads it with default data.
 IEntity createEntity(IDataProvider propertySource)
          Creates an entity with of the type described by this descriptor and loads it with data from the provided property source.
protected static IEntityRelation createEntityRelation(IFieldRelation[] fieldRelation, java.lang.String codeName, java.lang.String forwardName, java.lang.String reverseName)
          This help method makes possible for sub classes in other packages to easily create entity relations.
 IDataSourceDescriptor getDataSourceDescriptor()
          Returns the DataSource descriptor that this entity is a part of.
 void setDataSourceDescriptor(IDataSourceDescriptor dataSourceDescriptor)
           
protected  java.lang.Object writeReplace()
           
 
Methods inherited from class org.caleigo.core.AbstractEntityDescriptor
addEntityAction, contains, createCalculatedFieldDescriptors, createDeleteAction, createEntityRelation, createEntityRelation, createFieldDescriptor, createFieldRelation, createStoreAction, defineEntityActions, getAction, getAction, getActionCount, getActions, getCacheTime, getCodeName, getDataFieldCount, getDisplayName, getEntityClass, getEntityRelation, getEntityRelationCount, getEntityRelationIndex, getEntityRelations, getEntityType, getFieldCount, getFieldDescriptor, getFieldDescriptor, getFieldDescriptors, getFieldIndex, getFieldIndex, getHomeClass, getJNDIName, getNaturalOrder, getRemoteClass, getSourceName, isCacheable, isCreatable, isDeletable, isEditable, isListable, isScanable, isSelectable, loadEntity, loadSelection, setCacheTime, setFlags, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CustomEntityDescriptor

public CustomEntityDescriptor(java.lang.String codeName,
                              java.lang.String sourceName,
                              java.lang.String displayName,
                              IFieldDescriptor[] fields,
                              int entityType,
                              int flags,
                              int cacheTime,
                              IEntityRelation[] relations)
Method Detail

createEntity

public IEntity createEntity()
Creates an entity with of the type described by this descriptor and loads it with default data.

Specified by:
createEntity in interface IEntityDescriptor
Overrides:
createEntity in class AbstractEntityDescriptor

createEntity

public IEntity createEntity(IDataProvider propertySource)
Creates an entity with of the type described by this descriptor and loads it with data from the provided property source.

Specified by:
createEntity in interface IEntityDescriptor
Overrides:
createEntity in class AbstractEntityDescriptor

getDataSourceDescriptor

public IDataSourceDescriptor getDataSourceDescriptor()
Returns the DataSource descriptor that this entity is a part of.

Specified by:
getDataSourceDescriptor in interface IEntityDescriptor
Overrides:
getDataSourceDescriptor in class AbstractEntityDescriptor

setDataSourceDescriptor

public void setDataSourceDescriptor(IDataSourceDescriptor dataSourceDescriptor)

createEntityRelation

protected static IEntityRelation createEntityRelation(IFieldRelation[] fieldRelation,
                                                      java.lang.String codeName,
                                                      java.lang.String forwardName,
                                                      java.lang.String reverseName)
Description copied from class: AbstractEntityDescriptor
This help method makes possible for sub classes in other packages to easily create entity relations.


writeReplace

protected java.lang.Object writeReplace()
                                 throws java.io.ObjectStreamException
Overrides:
writeReplace in class AbstractEntityDescriptor
Throws:
java.io.ObjectStreamException


Copyright © 2005 Caleigo. All Rights Reserved.