/** * Read the optimizedIdCopy value from the config (if available) */ private void configureOptimizeIdCopy() { if (_repos != null && _repos.getConfiguration() != null) { _optimizeIdCopy = _repos.getConfiguration().getOptimizeIdCopy(); } }
/** * Read the optimizedIdCopy value from the config (if available) */ private void configureOptimizeIdCopy() { if (_repos != null && _repos.getConfiguration() != null) { _optimizeIdCopy = _repos.getConfiguration().getOptimizeIdCopy(); } }
/** * Create a new metadata parser. */ protected AnnotationPersistenceMetaDataParser newAnnotationParser() { return new AnnotationPersistenceMetaDataParser (repos.getConfiguration()); }
public void setRepository(MetaDataRepository repos) { this.repos = repos; if (repos != null) log = repos.getConfiguration().getLog (OpenJPAConfiguration.LOG_METADATA); }
public void setRepository(MetaDataRepository repos) { this.repos = repos; if (repos != null) log = repos.getConfiguration().getLog (OpenJPAConfiguration.LOG_METADATA); }
/** * Create a new serializer */ protected XMLPersistenceMetaDataSerializer newXMLSerializer() { return new XMLPersistenceMetaDataSerializer(repos.getConfiguration()); }
/** * Create a new JAXB XML annotation parser. */ protected AnnotationPersistenceXMLMetaDataParser newXMLAnnotationParser() { return new AnnotationPersistenceXMLMetaDataParser (repos.getConfiguration()); }
/** * Create a new metadata parser. */ protected XMLPersistenceMetaDataParser newXMLParser(boolean loading) { return new XMLPersistenceMetaDataParser(repos.getConfiguration()); }
public void setImplicitType(Class type) { _type = type; _container = (getMetaData() == null || !ImplHelper.isManagedType( getMetaData().getRepository().getConfiguration(), type)) && (Collection.class.isAssignableFrom(type) || Map.class.isAssignableFrom(type)); }
public void setImplicitType(Class type) { _type = type; _container = (getMetaData() == null || !ImplHelper.isManagedType( getMetaData().getRepository().getConfiguration(), type)) && (Collection.class.isAssignableFrom(type) || Map.class.isAssignableFrom(type)); }
public void setImplicitType(Class type) { _type = type; _container = (getMetaData() == null || !ImplHelper.isManagedType( getMetaData().getRepository().getConfiguration(), type)) && (Collection.class.isAssignableFrom(type) || Map.class.isAssignableFrom(type)); }
/** * Whether the class being enhanced should externalize to a detached * instance rather than serialize. */ private boolean externalizeDetached() { return ClassMetaData.SYNTHETIC.equals(_meta.getDetachedState()) && Serializable.class.isAssignableFrom(_meta.getDescribedType()) && !_repos.getConfiguration().getDetachStateInstance(). isDetachedStateTransient(); }
public void setImplicitType(Class type) { _type = type; _container = (getMetaData() == null || !ImplHelper.isManagedType( getMetaData().getRepository().getConfiguration(), type)) && (Collection.class.isAssignableFrom(type) || Map.class.isAssignableFrom(type)); }
/** * Return the data cache for this class, or null if it is not cachable. */ public DataCache getDataCache() { String name = getDataCacheName(); if (name == null) { return null; } return _repos.getConfiguration().getDataCacheManagerInstance().getDataCache(name, true); }
@Override protected XMLPersistenceMetaDataParser newXMLParser(boolean loading) { XMLPersistenceMappingParser parser = new XMLPersistenceMappingParser ((JDBCConfiguration) repos.getConfiguration()); // strict mode means we're using a separate mapping parser, so if // we're adapting parse metadata hints if (strict && loading) parser.setMappingOverride(((MappingRepository) repos). getStrategyInstaller().isAdapting()); return parser; }
void trace(ClassMetaData meta, Localizer.Message message) { Log log = meta.getRepository().getConfiguration() .getLog(OpenJPAConfiguration.LOG_RUNTIME); log.trace(message.toString()); }
void trace(ClassMetaData meta, Localizer.Message message) { Log log = meta.getRepository().getConfiguration() .getLog(OpenJPAConfiguration.LOG_RUNTIME); log.trace(message.toString()); }
void trace(ClassMetaData meta, Localizer.Message message) { Log log = meta.getRepository().getConfiguration() .getLog(OpenJPAConfiguration.LOG_RUNTIME); log.trace(message.toString()); }
@Override protected AnnotationPersistenceMetaDataParser newAnnotationParser() { AnnotationPersistenceMappingParser parser = new AnnotationPersistenceMappingParser((JDBCConfiguration) repos.getConfiguration()); // strict mode means we're using a separate mapping parser, so if // we're adapting parse metadata hints if (strict) parser.setMappingOverride(((MappingRepository) repos). getStrategyInstaller().isAdapting()); return parser; }
public Object getValue(Object[] params) { Object o = _constant.getValue(params); if (!(ImplHelper.isManageable(o))) return null; return (ImplHelper.toPersistenceCapable(o, this.getMetaData().getRepository().getConfiguration())) .pcFetchObjectId(); }