net.wotonomy.access
Class EOEntity

java.lang.Object
  extended by net.wotonomy.access.EOEntity
All Implemented Interfaces:
EOPropertyListEncoding

public class EOEntity
extends java.lang.Object
implements EOPropertyListEncoding

An EOEntity is a mapping between a Java class and a database table or view. It indicates which attributes should be fetched from the table/view, what attributes are part of the primary key, what class the entity should map to.

Version:
$Revision: 894 $
Author:
ezamudio@nasoft.com, $Author: cgruber $

Field Summary
protected  net.wotonomy.foundation.NSMutableDictionary _attributes
           
protected  java.lang.String _className
           
protected  java.lang.String _externalName
           
protected  net.wotonomy.foundation.NSMutableDictionary _fetchSpecs
           
protected  net.wotonomy.foundation.NSDictionary _internalInfo
           
protected  boolean _isAbstract
           
protected  boolean _isReadOnly
           
protected  net.wotonomy.foundation.NSMutableArray _lockingAttributes
           
protected  EOModel _model
           
protected  java.lang.String _name
           
protected  net.wotonomy.foundation.NSArray _pkAttributeNames
           
protected  net.wotonomy.foundation.NSArray _pkAttributes
           
protected  net.wotonomy.foundation.NSMutableDictionary _relations
           
protected  net.wotonomy.foundation.NSDictionary _userInfo
           
 
Constructor Summary
EOEntity()
           
EOEntity(net.wotonomy.foundation.NSDictionary dict, java.lang.Object obj)
           
 
Method Summary
 EOAttribute _attributeForPath(java.lang.String path)
           
 void addAttribute(EOAttribute atr)
           
 void addFetchSpecification(EOFetchSpecification fspec, java.lang.String name)
           
 void addRelationship(EORelationship rel)
           
 EOAttribute attributeNamed(java.lang.String name)
           
 net.wotonomy.foundation.NSArray attributes()
           
 net.wotonomy.foundation.NSArray attributesToFetch()
           
 net.wotonomy.foundation.NSArray attributesUsedForLocking()
           
 void awakeWithPropertyList(net.wotonomy.foundation.NSDictionary plist)
           
 EOClassDescription classDescriptionForInstances()
           
 java.lang.String className()
           
 net.wotonomy.foundation.NSArray classProperties()
           
 net.wotonomy.foundation.NSArray classPropertyAttributeNames()
           
 net.wotonomy.foundation.NSArray classPropertyNames()
           
 net.wotonomy.foundation.NSArray classPropertyToManyRelationshipNames()
           
 net.wotonomy.foundation.NSArray classPropertyToOneRelationshipNames()
           
 void encodeIntoPropertyList(net.wotonomy.foundation.NSMutableDictionary dict)
           
 net.wotonomy.foundation.NSArray externalModelsReferenced()
           
 java.lang.String externalName()
           
 EOFetchSpecification fetchSpecificationNamed(java.lang.String name)
           
 net.wotonomy.foundation.NSArray fetchSpecificationNames()
           
 net.wotonomy.foundation.NSArray flattenedAttributes()
           
 EOGlobalID globalIDForRow(java.util.Map row)
          Creates a global ID for a row.
 boolean hasSimplePrimaryKey()
           
 boolean isAbstractEntity()
           
 boolean isReadOnly()
           
 boolean isValidPrimaryKeyAttribute(EOAttribute attr)
           
 EOModel model()
           
 java.lang.String name()
           
 net.wotonomy.foundation.NSArray primaryKeyAttributeNames()
           
 net.wotonomy.foundation.NSArray primaryKeyAttributes()
           
 net.wotonomy.foundation.NSDictionary primaryKeyForGlobalID(EOGlobalID gid)
          Returns a dictionary with the primary key values contained in the global id.
 EOQualifier qualifierForPrimaryKey(java.util.Map pkey)
           
 EORelationship relationshipNamed(java.lang.String name)
           
 net.wotonomy.foundation.NSArray relationships()
          Returns the relationships from this entity to other entities.
 void removeAttribute(EOAttribute atr)
           
 void removeFetchSpecificationNamed(java.lang.String name)
           
 void removeRelationship(EORelationship rel)
           
 void setAttributesUsedForLocking(net.wotonomy.foundation.NSArray value)
           
 void setClassName(java.lang.String name)
           
 void setClassProperties(net.wotonomy.foundation.NSArray value)
           
 void setExternalName(java.lang.String name)
           
 void setIsAbstractEntity(boolean flag)
           
 void setName(java.lang.String name)
           
 void setPrimaryKeyAtributes(net.wotonomy.foundation.NSArray pk)
           
 void setReadOnly(boolean flag)
           
 void setStoredProcedure(EOStoredProcedure proc, java.lang.String operation)
           
 void setUserInfo(net.wotonomy.foundation.NSDictionary value)
           
 EOStoredProcedure storedProcedureForOperation(java.lang.String operation)
           
 net.wotonomy.foundation.NSArray subEntities()
           
 net.wotonomy.foundation.NSDictionary userInfo()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_attributes

protected net.wotonomy.foundation.NSMutableDictionary _attributes

_relations

protected net.wotonomy.foundation.NSMutableDictionary _relations

_pkAttributes

protected net.wotonomy.foundation.NSArray _pkAttributes

_pkAttributeNames

protected net.wotonomy.foundation.NSArray _pkAttributeNames

_fetchSpecs

protected net.wotonomy.foundation.NSMutableDictionary _fetchSpecs

_lockingAttributes

protected net.wotonomy.foundation.NSMutableArray _lockingAttributes

_className

protected java.lang.String _className

_name

protected java.lang.String _name

_externalName

protected java.lang.String _externalName

_isAbstract

protected boolean _isAbstract

_isReadOnly

protected boolean _isReadOnly

_model

protected EOModel _model

_userInfo

protected net.wotonomy.foundation.NSDictionary _userInfo

_internalInfo

protected net.wotonomy.foundation.NSDictionary _internalInfo
Constructor Detail

EOEntity

public EOEntity()

EOEntity

public EOEntity(net.wotonomy.foundation.NSDictionary dict,
                java.lang.Object obj)
Method Detail

addAttribute

public void addAttribute(EOAttribute atr)

removeAttribute

public void removeAttribute(EOAttribute atr)

addFetchSpecification

public void addFetchSpecification(EOFetchSpecification fspec,
                                  java.lang.String name)

removeFetchSpecificationNamed

public void removeFetchSpecificationNamed(java.lang.String name)

fetchSpecificationNamed

public EOFetchSpecification fetchSpecificationNamed(java.lang.String name)

fetchSpecificationNames

public net.wotonomy.foundation.NSArray fetchSpecificationNames()

attributes

public net.wotonomy.foundation.NSArray attributes()

attributeNamed

public EOAttribute attributeNamed(java.lang.String name)

flattenedAttributes

public net.wotonomy.foundation.NSArray flattenedAttributes()

setClassName

public void setClassName(java.lang.String name)

className

public java.lang.String className()

setName

public void setName(java.lang.String name)

name

public java.lang.String name()

setExternalName

public void setExternalName(java.lang.String name)

externalName

public java.lang.String externalName()

addRelationship

public void addRelationship(EORelationship rel)

removeRelationship

public void removeRelationship(EORelationship rel)

relationships

public net.wotonomy.foundation.NSArray relationships()
Returns the relationships from this entity to other entities.

Returns:
An array of the relationships of this entity.

relationshipNamed

public EORelationship relationshipNamed(java.lang.String name)

model

public EOModel model()

setPrimaryKeyAtributes

public void setPrimaryKeyAtributes(net.wotonomy.foundation.NSArray pk)

primaryKeyAttributes

public net.wotonomy.foundation.NSArray primaryKeyAttributes()

primaryKeyAttributeNames

public net.wotonomy.foundation.NSArray primaryKeyAttributeNames()

hasSimplePrimaryKey

public boolean hasSimplePrimaryKey()

isValidPrimaryKeyAttribute

public boolean isValidPrimaryKeyAttribute(EOAttribute attr)

setAttributesUsedForLocking

public void setAttributesUsedForLocking(net.wotonomy.foundation.NSArray value)

attributesUsedForLocking

public net.wotonomy.foundation.NSArray attributesUsedForLocking()

setClassProperties

public void setClassProperties(net.wotonomy.foundation.NSArray value)

classProperties

public net.wotonomy.foundation.NSArray classProperties()

classPropertyNames

public net.wotonomy.foundation.NSArray classPropertyNames()

classPropertyAttributeNames

public net.wotonomy.foundation.NSArray classPropertyAttributeNames()

classPropertyToManyRelationshipNames

public net.wotonomy.foundation.NSArray classPropertyToManyRelationshipNames()

classPropertyToOneRelationshipNames

public net.wotonomy.foundation.NSArray classPropertyToOneRelationshipNames()

setIsAbstractEntity

public void setIsAbstractEntity(boolean flag)

isAbstractEntity

public boolean isAbstractEntity()

setReadOnly

public void setReadOnly(boolean flag)

isReadOnly

public boolean isReadOnly()

setStoredProcedure

public void setStoredProcedure(EOStoredProcedure proc,
                               java.lang.String operation)

storedProcedureForOperation

public EOStoredProcedure storedProcedureForOperation(java.lang.String operation)

subEntities

public net.wotonomy.foundation.NSArray subEntities()

attributesToFetch

public net.wotonomy.foundation.NSArray attributesToFetch()

externalModelsReferenced

public net.wotonomy.foundation.NSArray externalModelsReferenced()

classDescriptionForInstances

public EOClassDescription classDescriptionForInstances()

globalIDForRow

public EOGlobalID globalIDForRow(java.util.Map row)
Creates a global ID for a row. The row must have values for all the primary key attributes.

Parameters:
row - A raw row for this entity.
Returns:
A key global ID to identify this row.

primaryKeyForGlobalID

public net.wotonomy.foundation.NSDictionary primaryKeyForGlobalID(EOGlobalID gid)
Returns a dictionary with the primary key values contained in the global id.

Parameters:
gid - A Key global ID.
Returns:
A dictionary with the primary key values for gid.

qualifierForPrimaryKey

public EOQualifier qualifierForPrimaryKey(java.util.Map pkey)

setUserInfo

public void setUserInfo(net.wotonomy.foundation.NSDictionary value)

userInfo

public net.wotonomy.foundation.NSDictionary userInfo()

awakeWithPropertyList

public void awakeWithPropertyList(net.wotonomy.foundation.NSDictionary plist)
Specified by:
awakeWithPropertyList in interface EOPropertyListEncoding

encodeIntoPropertyList

public void encodeIntoPropertyList(net.wotonomy.foundation.NSMutableDictionary dict)
Specified by:
encodeIntoPropertyList in interface EOPropertyListEncoding

_attributeForPath

public EOAttribute _attributeForPath(java.lang.String path)


Copyright © 2006 null. All Rights Reserved.