/** * Check if class is persistence aware, by looking at annotations * @param cls the Class * @return true if the class has @PersistenceAware */ protected boolean isClassPersistenceAware(Class cls) { String jpaLevel = mgr.getOMFContext().getPersistenceConfiguration().getStringProperty("datanucleus.jpa.level"); if (jpaLevel.equalsIgnoreCase("DataNucleus")) { AnnotationObject[] annotations = getClassAnnotationsForClass(cls); for (int i = 0; i < annotations.length; i++) { String annName = annotations[i].getName(); if (annName.equals(JPAAnnotationUtils.PERSISTENCE_AWARE)) { return true; } } } return false; } }
/** * Constructor. * @param metadataMgr Manager for MetaData */ public AnnotationManagerImpl(MetaDataManager metadataMgr) { this.metadataMgr = metadataMgr; // Load up the registry of available annotation readers Extension[] ex = this.metadataMgr.getOMFContext().getPluginManager().getExtensionPoint("org.datanucleus.java5.annotations").getExtensions(); for (int i=0; i<ex.length; i++) { ConfigurationElement[] confElm = ex[i].getConfigurationElements(); for (int j=0; j<confElm.length; j++) { annotationReaderLookup.put(confElm[j].getAttribute("annotation-class"), confElm[j].getAttribute("reader")); } } }
boolean addJoin = false; String jpaLevel = mgr.getOMFContext().getPersistenceConfiguration().getStringProperty("datanucleus.jpa.level"); for (int i=0;annotations != null && i<annotations.length;i++)
boolean addJoin = false; String jpaLevel = mgr.getOMFContext().getPersistenceConfiguration().getStringProperty("datanucleus.jpa.level"); for (int i=0;annotations != null && i<annotations.length;i++)
String jpaLevel = mgr.getOMFContext().getPersistenceConfiguration().getStringProperty("datanucleus.jpa.level"); if ((annotations != null && annotations.length > 0) || JPAAnnotationUtils.isBasicByDefault(member.getType()))
HashSet<ExtensionMetaData> extensions = null; String jpaLevel = mgr.getOMFContext().getPersistenceConfiguration().getStringProperty("datanucleus.jpa.level"); for (int i=0;i<annotations.length;i++)
public MetamodelImpl(MetaDataManager mmgr) this.clr = mmgr.getOMFContext().getClassLoaderResolver(null);
String jpaLevel = mgr.getOMFContext().getPersistenceConfiguration().getStringProperty("datanucleus.jpa.level"); if ((annotations != null && annotations.length > 0) || JPAAnnotationUtils.isBasicByDefault(member.getType()))
HashSet<ExtensionMetaData> extensions = null; String jpaLevel = mgr.getOMFContext().getPersistenceConfiguration().getStringProperty("datanucleus.jpa.level"); for (int i=0;i<annotations.length;i++)
mmd.setTargetClassName(getAttr(attrs, "target-entity")); mmd.setOrdered(); String jpaLevel = mgr.getOMFContext().getPersistenceConfiguration().getStringProperty("datanucleus.jpa.level"); if (mmd.getMappedBy() == null && mmd.getJoinMetaData() == null && jpaLevel.equalsIgnoreCase("JPA1"))
String jpaLevel = mgr.getOMFContext().getPersistenceConfiguration().getStringProperty("datanucleus.jpa.level"); if (mmd.getMappedBy() == null && mmd.getJoinMetaData() == null && jpaLevel.equalsIgnoreCase("JPA1"))