public static PersistenceType getPersistenceType(ClassMetaData meta) { if (meta == null) return BASIC; if (meta.isAbstract()) return MAPPED_SUPERCLASS; if (meta.isEmbeddable()) return EMBEDDABLE; return ENTITY; }
public static PersistenceType getPersistenceType(ClassMetaData meta) { if (meta == null) return BASIC; if (meta.isAbstract()) return MAPPED_SUPERCLASS; if (meta.isEmbeddable()) return EMBEDDABLE; return ENTITY; }
public static PersistenceType getPersistenceType(ClassMetaData meta) { if (meta == null) return BASIC; if (meta.isAbstract()) return MAPPED_SUPERCLASS; if (meta.isEmbeddable()) return EMBEDDABLE; return ENTITY; }
public static PersistenceType getPersistenceType(ClassMetaData meta) { if (meta == null) return BASIC; if (meta.isAbstract()) return MAPPED_SUPERCLASS; if (meta.isEmbeddable()) return EMBEDDABLE; return ENTITY; }
/** * Constructor; supply id, type metadata, and owning persistence manager. */ protected StateManagerImpl(Object id, ClassMetaData meta, BrokerImpl broker) { _id = id; _meta = meta; _broker = broker; _single = new SingleFieldManager(this, broker); if (broker.getMultithreaded()) _instanceLock = new ReentrantLock(); if (_meta.getIdentityType() == ClassMetaData.ID_UNKNOWN && !_meta.isEmbeddable()) throw new UserException(_loc.get("meta-unknownid", _meta)); }
/** * Constructor; supply id, type metadata, and owning persistence manager. */ protected StateManagerImpl(Object id, ClassMetaData meta, BrokerImpl broker) { _id = id; _meta = meta; _broker = broker; _single = new SingleFieldManager(this, broker); if (broker.getMultithreaded()) _instanceLock = new ReentrantLock(); if (_meta.getIdentityType() == ClassMetaData.ID_UNKNOWN && !_meta.isEmbeddable()) throw new UserException(_loc.get("meta-unknownid", _meta)); }
/** * Constructor; supply id, type metadata, and owning persistence manager. */ protected StateManagerImpl(Object id, ClassMetaData meta, BrokerImpl broker) { _id = id; _meta = meta; _broker = broker; _single = new SingleFieldManager(this, broker); if (broker.getMultithreaded()) _instanceLock = new ReentrantLock(); if (_meta.getIdentityType() == ClassMetaData.ID_UNKNOWN && !_meta.isEmbeddable()) throw new UserException(_loc.get("meta-unknownid", _meta)); }
/** * Constructor; supply id, type metadata, and owning persistence manager. */ protected StateManagerImpl(Object id, ClassMetaData meta, BrokerImpl broker) { _id = id; _meta = meta; _broker = broker; _single = new SingleFieldManager(this, broker); if (broker.getMultithreaded()) _instanceLock = new ReentrantLock(); if (_meta.getIdentityType() == ClassMetaData.ID_UNKNOWN && !_meta.isEmbeddable()) throw new UserException(_loc.get("meta-unknownid", _meta)); }
PersistenceType actual = getPersistenceType(meta); if (actual != expected) { if (!meta.isEmbeddable() || actual != PersistenceType.ENTITY || expected != PersistenceType.EMBEDDABLE) throw new IllegalArgumentException( _loc.get("type-wrong-category",
PersistenceType actual = getPersistenceType(meta); if (actual != expected) { if (!meta.isEmbeddable() || actual != PersistenceType.ENTITY || expected != PersistenceType.EMBEDDABLE) throw new IllegalArgumentException( _loc.get("type-wrong-category",
PersistenceType actual = getPersistenceType(meta); if (actual != expected) { if (!meta.isEmbeddable() || actual != PersistenceType.ENTITY || expected != PersistenceType.EMBEDDABLE) throw new IllegalArgumentException( _loc.get("type-wrong-category",
PersistenceType actual = getPersistenceType(meta); if (actual != expected) { if (!meta.isEmbeddable() || actual != PersistenceType.ENTITY || expected != PersistenceType.EMBEDDABLE) throw new IllegalArgumentException( _loc.get("type-wrong-category",
/** * Constructs a model with the current content of the supplied non-null repository. * */ public MetamodelImpl(MetaDataRepository repos) { this.repos = repos; Collection<Class<?>> classes = repos.loadPersistentTypes(true, null); for (Class<?> cls : classes) { ClassMetaData meta = repos.getMetaData(cls, null, true); PersistenceType type = getPersistenceType(meta); switch (type) { case ENTITY: find(cls, _entities, ENTITY, false); if (meta.isEmbeddable()) find(cls, _embeddables, EMBEDDABLE, false); break; case EMBEDDABLE: find(cls, _embeddables, EMBEDDABLE, false); break; case MAPPED_SUPERCLASS: find(cls, _mappedsupers, MAPPED_SUPERCLASS, false); break; default: } } }
/** * Constructs a model with the current content of the supplied non-null repository. * */ public MetamodelImpl(MetaDataRepository repos) { this.repos = repos; Collection<Class<?>> classes = repos.loadPersistentTypes(true, null); for (Class<?> cls : classes) { ClassMetaData meta = repos.getMetaData(cls, null, true); PersistenceType type = getPersistenceType(meta); switch (type) { case ENTITY: find(cls, _entities, ENTITY, false); if (meta.isEmbeddable()) find(cls, _embeddables, EMBEDDABLE, false); break; case EMBEDDABLE: find(cls, _embeddables, EMBEDDABLE, false); break; case MAPPED_SUPERCLASS: find(cls, _mappedsupers, MAPPED_SUPERCLASS, false); break; default: } } }
/** * Constructs a model with the current content of the supplied non-null repository. * */ public MetamodelImpl(MetaDataRepository repos) { this.repos = repos; Collection<Class<?>> classes = repos.loadPersistentTypes(true, null); for (Class<?> cls : classes) { ClassMetaData meta = repos.getMetaData(cls, null, true); PersistenceType type = getPersistenceType(meta); switch (type) { case ENTITY: find(cls, _entities, ENTITY, false); if (meta.isEmbeddable()) find(cls, _embeddables, EMBEDDABLE, false); break; case EMBEDDABLE: find(cls, _embeddables, EMBEDDABLE, false); break; case MAPPED_SUPERCLASS: find(cls, _mappedsupers, MAPPED_SUPERCLASS, false); break; default: } } }
/** * Constructs a model with the current content of the supplied non-null repository. * */ public MetamodelImpl(MetaDataRepository repos) { this.repos = repos; Collection<Class<?>> classes = repos.loadPersistentTypes(true, null); for (Class<?> cls : classes) { ClassMetaData meta = repos.getMetaData(cls, null, true); PersistenceType type = getPersistenceType(meta); switch (type) { case ENTITY: find(cls, _entities, ENTITY, false); if (meta.isEmbeddable()) find(cls, _embeddables, EMBEDDABLE, false); break; case EMBEDDABLE: find(cls, _embeddables, EMBEDDABLE, false); break; case MAPPED_SUPERCLASS: find(cls, _mappedsupers, MAPPED_SUPERCLASS, false); break; default: } } }
if (_meta.isEmbeddable() && _meta.getIdentityType() == ClassMetaData.ID_APPLICATION) { _log.warn(_loc.get("ID-field-in-embeddable-unsupported", _meta.toString()));
if (_meta.isEmbeddable() && _meta.getIdentityType() == ClassMetaData.ID_APPLICATION) { _log.warn(_loc.get("ID-field-in-embeddable-unsupported", _meta.toString()));
if (_meta.isEmbeddable() && _meta.getIdentityType() == ClassMetaData.ID_APPLICATION) { _log.warn(_loc.get("ID-field-in-embeddable-unsupported", _meta.toString()));
if (_meta.isEmbeddable() && _meta.getIdentityType() == ClassMetaData.ID_APPLICATION) { _log.warn(_loc.get("ID-field-in-embeddable-unsupported", _meta.toString()));