public class ERXLongPrimaryKeyFactory extends Object
private NSDictionary _primaryKeyDictionary = null;
public NSDictionary primaryKeyDictionary(boolean inTransaction) {
if (_primaryKeyDictionary == null) {
_primaryKeyDictionary = ERXLongPrimaryKeyFactory.primaryKeyDictionary(this);
}
return _primaryKeyDictionary;
}
or manually callERXLongPrimaryKeyFactory.primaryKeyDictionary(EOEnterpriseObject eo);
the necessary database table is generated on the fly.
ERXIntegerPrimaryKeyFactory.encodeEntityInPkValue
is
set to true
then the last 6 bits from the 64 bit primary key is used to
encode the Subentity in the pk value. This speeds up inheritance with multiple tables. In
order to support this you must add an entry to the userInfo from the Subentities:
key=entityCode
value= %lt;%lt; an unique integer, no longer than 6 bit - 1
Constructor and Description |
---|
ERXLongPrimaryKeyFactory() |
Modifier and Type | Method and Description |
---|---|
static NSDictionary |
primaryKeyDictionary(com.webobjects.eocontrol.EOEnterpriseObject eo) |
static Object |
primaryKeyValue(String entityName) |
com.webobjects.eoaccess.EOEntity |
subEntityForEntity(com.webobjects.eoaccess.EOEntity entity,
NSDictionary pkDict) |
public com.webobjects.eoaccess.EOEntity subEntityForEntity(com.webobjects.eoaccess.EOEntity entity, NSDictionary pkDict)
public static NSDictionary primaryKeyDictionary(com.webobjects.eocontrol.EOEnterpriseObject eo)
Copyright © 2002 – 2020 Project Wonder.