public JDOImplHelper run () { return JDOImplHelper.getInstance(); } }
/** * Method to return a new object identity for the specified class, and key (possibly toString() output). * @param cls Persistable class * @param key form of the object id * @return The object identity */ public Object getNewApplicationIdentityObjectId(Class cls, Object key) { // TODO Replace this with a non-JDO method return NucleusJPAHelper.getJDOImplHelper().newObjectIdInstance(cls, key); }
/** Check that the parameter instance is of a class that is authorized for * JDOPermission("setStateManager"). This method is called by the * replaceStateManager method in persistence-capable classes. * A class that is passed as the parameter to replaceStateManager must be * authorized for JDOPermission("setStateManager"). To improve performance, * first the set of authorized classes is checked, and if not present, a * regular permission check is made. The regular permission check requires * that all callers on the stack, including the persistence-capable class * itself, must be authorized for JDOPermission("setStateManager"). * @param sm an instance of StateManager whose class is to be checked. * @since 1.0.1 */ public static void checkAuthorizedStateManager (StateManager sm) { checkAuthorizedStateManagerClass(sm.getClass()); }
/** * @param props NOT SUPPORTED! */ public PersistenceManagerFactoryImpl(Properties props) { super(props); JDOImplHelper.getInstance().addStateInterrogation(SI); }
id = JDOImplHelper.getInstance().newObjectIdInstance(pcClass, key);
/** * Convenience method to return the ObjectProvider for the specified value. * The return will never be null, since we always want to store all properties into the * owning object (for querying). * @param ammd Metadata for the member where this object is embedded * @param fieldNumber Field number in the owning object where this is embedded * @param value The embedded value (or null, maybe when retrieving) * @return ObjectProvider to use */ protected ObjectProvider getEmbeddedObjectProvider(Class type, int fieldNumber, Object value) { if (value == null) { value = JDOImplHelper.getInstance().newInstance(type, (javax.jdo.spi.StateManager)getObjectProvider()); } ObjectProvider embeddedOP = ec.findObjectProvider(value); if (embeddedOP == null) { embeddedOP = ObjectProviderFactory.newForEmbedded(ec, value, false, getObjectProvider(), fieldNumber); embeddedOP.setPcObjectType(ObjectProvider.EMBEDDED_PC); } return embeddedOP; }
/** Get the field names for a <code>PersistenceCapable</code> class. The * order of fields is the natural ordering of the <code>String</code> class * (without considering localization). * @param pcClass the <code>PersistenceCapable</code> class. * @return the field names for the class. */ public String[] getFieldNames (Class pcClass) { Meta meta = getMeta (pcClass); return meta.getFieldNames(); }
JDOImplHelper.getInstance().removeStateInterrogation(SI); isClosed = true;
/** * Constructor, specifying the PMFContext used. * @param pmfContext PMF Context that this metadata manager operates in */ public MetaDataManager(PMFContext pmfContext) { this.pmfContext = pmfContext; JDOImplHelper.getInstance().removeRegisterClassListener(new MetaDataRegisterClassListener()); this.setValidate(pmfContext.getPmfConfiguration().getMetaDataValidate()); if (JavaUtils.isJRE1_5OrAbove()) { try { ClassLoaderResolver clr = pmfContext.getClassLoaderResolver(null); // TODO This is hardcoded to the Java5 manager. Make it configurable ? Class annotationReaderClass = clr.classForName("org.jpox.metadata.annotations.AnnotationManagerImpl"); Class[] ctrArgs = new Class[] {MetaDataManager.class}; Object[] ctrParams = new Object[] {this}; Constructor ctor = annotationReaderClass.getConstructor(ctrArgs); annotationManager = (AnnotationManager)ctor.newInstance(ctrParams); } catch (Exception e) { JPOXLogger.METADATA.warn(LOCALISER.msg("MetaData.AnnotationManagerNotFound")); } } }
static Set<String> createUserConfigurableStandardPropertiesLowerCased() { Set<String> mixedCased = createUserConfigurableStandardProperties(); Set<String> lowerCased = new HashSet<String>(mixedCased.size()); for (String propertyName : mixedCased) { lowerCased.add(propertyName.toLowerCase()); } return Collections.unmodifiableSet(lowerCased); }
protected static DocumentBuilderFactory getDocumentBuilderFactory() { @SuppressWarnings("static-access") DocumentBuilderFactory factory = implHelper.getRegisteredDocumentBuilderFactory(); if (factory == null) { factory = getDefaultDocumentBuilderFactory(); } return factory; }
keyAsObject = helper.construct(className, keyString); } else { keyAsObject = param;
"EXC_GetPMFNullLoader")); //NOI18N JDOImplHelper.assertOnlyKnownStandardProperties(overrides); JDOImplHelper.assertOnlyKnownStandardProperties(props);
/** Get the field flags for a <code>PersistenceCapable</code> class. The * order of fields is the same as for field names. * @param pcClass the <code>PersistenceCapable</code> class. * @return the field types for the class. */ public byte[] getFieldFlags (Class pcClass) { Meta meta = getMeta (pcClass); return meta.getFieldFlags(); }
static Set<String> createUserConfigurableStandardPropertiesLowerCased() { Set<String> mixedCased = createUserConfigurableStandardProperties(); Set<String> lowerCased = new HashSet<String>(mixedCased.size()); for (String propertyName : mixedCased) { lowerCased.add(propertyName.toLowerCase()); } return Collections.unmodifiableSet(lowerCased); }
protected static DocumentBuilderFactory getDocumentBuilderFactory() { @SuppressWarnings("static-access") DocumentBuilderFactory factory = implHelper.getRegisteredDocumentBuilderFactory(); if (factory == null) { factory = getDefaultDocumentBuilderFactory(); } return factory; }
keyAsObject = helper.construct(className, keyString); } else { keyAsObject = param;
"EXC_GetPMFNullLoader")); //NOI18N JDOImplHelper.assertOnlyKnownStandardProperties(overrides); JDOImplHelper.assertOnlyKnownStandardProperties(props);
public JDOImplHelper run () { return JDOImplHelper.getInstance(); } }
/** Get the persistence-capable superclass for a * <code>PersistenceCapable</code> class. * @param pcClass the <code>PersistenceCapable</code> class. * @return The <code>PersistenceCapable</code> superclass for this class, * or <code>null</code> if there isn't one. */ public Class getPersistenceCapableSuperclass (Class pcClass) { Meta meta = getMeta (pcClass); return meta.getPersistenceCapableSuperclass(); }