/** * The type of identity being used. This will be one of: * <ul> * <li>{@link #ID_UNKNOWN}: unknown identity type</li> * <li>{@link #ID_DATASTORE}: identity managed by the data store and * independent of the fields of the instance</li> * <li>{@link #ID_APPLICATION}: identity managed by the application and * defined by one or more fields of the instance</li> * </ul> If unspecified, defaults to {@link #ID_DATASTORE} if there are no * primary key fields, and {@link #ID_APPLICATION} otherwise. */ public int getIdentityType() { if (_identity == ID_UNKNOWN) { ClassMetaData sup = getPCSuperclassMetaData(); if (sup != null && sup.getIdentityType() != ID_UNKNOWN) _identity = sup.getIdentityType(); else if (getPrimaryKeyFields().length > 0) _identity = ID_APPLICATION; else if (isMapped()) _identity = ID_DATASTORE; else _identity = _repos.getMetaDataFactory().getDefaults(). getDefaultIdentityType(); } return _identity; }
/** * The type of identity being used. This will be one of: * <ul> * <li>{@link #ID_UNKNOWN}: unknown identity type</li> * <li>{@link #ID_DATASTORE}: identity managed by the data store and * independent of the fields of the instance</li> * <li>{@link #ID_APPLICATION}: identity managed by the application and * defined by one or more fields of the instance</li> * </ul> If unspecified, defaults to {@link #ID_DATASTORE} if there are no * primary key fields, and {@link #ID_APPLICATION} otherwise. */ public int getIdentityType() { if (_identity != null) { return _identity; } else { ClassMetaData sup = getPCSuperclassMetaData(); if (sup != null && sup.getIdentityType() != ID_UNKNOWN) _identity = sup.getIdentityType(); else if (getPrimaryKeyFields().length > 0) _identity = ID_APPLICATION; else if (isMapped()) _identity = ID_DATASTORE; else if (isAbstract()) _identity = ID_UNKNOWN; else _identity = _repos.getMetaDataFactory().getDefaults(). getDefaultIdentityType(); } return _identity; }
/** * The type of identity being used. This will be one of: * <ul> * <li>{@link #ID_UNKNOWN}: unknown identity type</li> * <li>{@link #ID_DATASTORE}: identity managed by the data store and * independent of the fields of the instance</li> * <li>{@link #ID_APPLICATION}: identity managed by the application and * defined by one or more fields of the instance</li> * </ul> If unspecified, defaults to {@link #ID_DATASTORE} if there are no * primary key fields, and {@link #ID_APPLICATION} otherwise. */ public int getIdentityType() { if (_identity != null) { return _identity; } else { ClassMetaData sup = getPCSuperclassMetaData(); if (sup != null && sup.getIdentityType() != ID_UNKNOWN) _identity = sup.getIdentityType(); else if (getPrimaryKeyFields().length > 0) _identity = ID_APPLICATION; else if (isMapped()) _identity = ID_DATASTORE; else if (isAbstract()) _identity = ID_UNKNOWN; else _identity = _repos.getMetaDataFactory().getDefaults(). getDefaultIdentityType(); } return _identity; }
/** * The type of identity being used. This will be one of: * <ul> * <li>{@link #ID_UNKNOWN}: unknown identity type</li> * <li>{@link #ID_DATASTORE}: identity managed by the data store and * independent of the fields of the instance</li> * <li>{@link #ID_APPLICATION}: identity managed by the application and * defined by one or more fields of the instance</li> * </ul> If unspecified, defaults to {@link #ID_DATASTORE} if there are no * primary key fields, and {@link #ID_APPLICATION} otherwise. */ public int getIdentityType() { if (_identity != null) { return _identity; } else { ClassMetaData sup = getPCSuperclassMetaData(); if (sup != null && sup.getIdentityType() != ID_UNKNOWN) _identity = sup.getIdentityType(); else if (getPrimaryKeyFields().length > 0) _identity = ID_APPLICATION; else if (isMapped()) _identity = ID_DATASTORE; else if (isAbstract()) _identity = ID_UNKNOWN; else _identity = _repos.getMetaDataFactory().getDefaults(). getDefaultIdentityType(); } return _identity; }
/** * The type of identity being used. This will be one of: * <ul> * <li>{@link #ID_UNKNOWN}: unknown identity type</li> * <li>{@link #ID_DATASTORE}: identity managed by the data store and * independent of the fields of the instance</li> * <li>{@link #ID_APPLICATION}: identity managed by the application and * defined by one or more fields of the instance</li> * </ul> If unspecified, defaults to {@link #ID_DATASTORE} if there are no * primary key fields, and {@link #ID_APPLICATION} otherwise. */ public int getIdentityType() { if (_identity != null) { return _identity; } else { ClassMetaData sup = getPCSuperclassMetaData(); if (sup != null && sup.getIdentityType() != ID_UNKNOWN) _identity = sup.getIdentityType(); else if (getPrimaryKeyFields().length > 0) _identity = ID_APPLICATION; else if (isMapped()) _identity = ID_DATASTORE; else if (isAbstract()) _identity = ID_UNKNOWN; else _identity = _repos.getMetaDataFactory().getDefaults(). getDefaultIdentityType(); } return _identity; }