/** * Constructs a new tool instance capable of generating an * object id class for <code>meta</code>. */ public ApplicationIdTool(OpenJPAConfiguration conf, Class type, ClassMetaData meta) { _log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE); _type = type; _meta = meta; if (_meta != null) { _abstract = Modifier.isAbstract(_meta.getDescribedType(). getModifiers()); _fields = getDeclaredPrimaryKeyFields(_meta); } }
/** * Constructs a new tool instance capable of generating an * object id class for <code>meta</code>. */ public ApplicationIdTool(OpenJPAConfiguration conf, Class type, ClassMetaData meta) { _log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE); _type = type; _meta = meta; if (_meta != null) { _abstract = Modifier.isAbstract(_meta.getDescribedType(). getModifiers()); _fields = getDeclaredPrimaryKeyFields(_meta); } }
/** * Constructs a new tool instance capable of generating an * object id class for <code>meta</code>. */ public ApplicationIdTool(OpenJPAConfiguration conf, Class type, ClassMetaData meta) { _log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE); _type = type; _meta = meta; if (_meta != null) { _abstract = Modifier.isAbstract(_meta.getDescribedType(). getModifiers()); _fields = getDeclaredPrimaryKeyFields(_meta); } }
/** * Constructs a new tool instance capable of generating an * object id class for <code>meta</code>. */ public ApplicationIdTool(OpenJPAConfiguration conf, Class type, ClassMetaData meta) { _log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE); _type = type; _meta = meta; if (_meta != null) { _abstract = Modifier.isAbstract(_meta.getDescribedType(). getModifiers()); _fields = getDeclaredPrimaryKeyFields(_meta); } }
/** * Constructs a new tool instance capable of generating an * object id class for <code>meta</code>. */ public ApplicationIdTool(OpenJPAConfiguration conf, Class type, ClassMetaData meta) { _log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE); _type = type; _meta = meta; if (_meta != null) { _abstract = Modifier.isAbstract(_meta.getDescribedType(). getModifiers()); _fields = getDeclaredPrimaryKeyFields(_meta); } }
/** * Constructs a new ApplicationIdTool capable of generating an * object id class for <code>type</code>. */ public ApplicationIdTool(OpenJPAConfiguration conf, Class type) { _log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE); _type = type; MetaDataRepository repos = conf.newMetaDataRepositoryInstance(); repos.setValidate(repos.VALIDATE_NONE); repos.setSourceMode(repos.MODE_MAPPING, false); loadObjectIds(repos, true); _meta = repos.getMetaData(type, null, false); if (_meta != null) { _abstract = Modifier.isAbstract(_meta.getDescribedType(). getModifiers()); _fields = getDeclaredPrimaryKeyFields(_meta); } }
/** * Constructs a new ApplicationIdTool capable of generating an * object id class for <code>type</code>. */ public ApplicationIdTool(OpenJPAConfiguration conf, Class type) { _log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE); _type = type; MetaDataRepository repos = conf.newMetaDataRepositoryInstance(); repos.setValidate(repos.VALIDATE_NONE); repos.setSourceMode(repos.MODE_MAPPING, false); loadObjectIds(repos, true); _meta = repos.getMetaData(type, null, false); if (_meta != null) { _abstract = Modifier.isAbstract(_meta.getDescribedType(). getModifiers()); _fields = getDeclaredPrimaryKeyFields(_meta); } }
/** * Constructs a new ApplicationIdTool capable of generating an * object id class for <code>type</code>. */ public ApplicationIdTool(OpenJPAConfiguration conf, Class type) { _log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE); _type = type; MetaDataRepository repos = conf.newMetaDataRepositoryInstance(); repos.setValidate(repos.VALIDATE_NONE); repos.setSourceMode(repos.MODE_MAPPING, false); loadObjectIds(repos, true); _meta = repos.getMetaData(type, null, false); if (_meta != null) { _abstract = Modifier.isAbstract(_meta.getDescribedType(). getModifiers()); _fields = getDeclaredPrimaryKeyFields(_meta); } }
/** * Constructs a new ApplicationIdTool capable of generating an * object id class for <code>type</code>. */ public ApplicationIdTool(OpenJPAConfiguration conf, Class type) { _log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE); _type = type; MetaDataRepository repos = conf.newMetaDataRepositoryInstance(); repos.setValidate(repos.VALIDATE_NONE); repos.setSourceMode(repos.MODE_MAPPING, false); loadObjectIds(repos, true); _meta = repos.getMetaData(type, null, false); if (_meta != null) { _abstract = Modifier.isAbstract(_meta.getDescribedType(). getModifiers()); _fields = getDeclaredPrimaryKeyFields(_meta); } }
/** * Set the object id type of the given metadata. */ private static void setObjectIdType(ClassMetaData meta, Flags flags, BCClassLoader bc) throws ClassNotFoundException { if (meta == null || (meta.getObjectIdType() != null && (!meta.isOpenJPAIdentity() || flags.name == null)) || getDeclaredPrimaryKeyFields(meta).length == 0) return; Class desc = meta.getDescribedType(); Class cls = null; if (flags.name != null) cls = loadClass(desc, flags.name, bc); else if (flags.suffix != null) cls = loadClass(desc, desc.getName() + flags.suffix, bc); meta.setObjectIdType(cls, false); }
/** * Set the object id type of the given metadata. */ private static void setObjectIdType(ClassMetaData meta, Flags flags, BCClassLoader bc) throws ClassNotFoundException { if (meta == null || (meta.getObjectIdType() != null && (!meta.isOpenJPAIdentity() || flags.name == null)) || getDeclaredPrimaryKeyFields(meta).length == 0) return; Class desc = meta.getDescribedType(); Class cls = null; if (flags.name != null) cls = loadClass(desc, flags.name, bc); else if (flags.suffix != null) cls = loadClass(desc, desc.getName() + flags.suffix, bc); meta.setObjectIdType(cls, false); }
/** * Constructs a new ApplicationIdTool capable of generating an * object id class for <code>type</code>. */ public ApplicationIdTool(OpenJPAConfiguration conf, Class type) { _log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE); _type = type; MetaDataRepository repos = conf.newMetaDataRepositoryInstance(); repos.setValidate(repos.VALIDATE_NONE); repos.setSourceMode(repos.MODE_MAPPING, false); loadObjectIds(repos, true); _meta = repos.getMetaData(type, null, false); if (_meta != null) { _abstract = Modifier.isAbstract(_meta.getDescribedType(). getModifiers()); _fields = getDeclaredPrimaryKeyFields(_meta); } }
/** * Set the object id type of the given metadata. */ private static void setObjectIdType(ClassMetaData meta, Flags flags, BCClassLoader bc) throws ClassNotFoundException { if (meta == null || (meta.getObjectIdType() != null && (!meta.isOpenJPAIdentity() || flags.name == null)) || getDeclaredPrimaryKeyFields(meta).length == 0) return; Class desc = meta.getDescribedType(); Class cls = null; if (flags.name != null) cls = loadClass(desc, flags.name, bc); else if (flags.suffix != null) cls = loadClass(desc, desc.getName() + flags.suffix, bc); meta.setObjectIdType(cls, false); }
/** * Set the object id type of the given metadata. */ private static void setObjectIdType(ClassMetaData meta, Flags flags, BCClassLoader bc) throws ClassNotFoundException { if (meta == null || (meta.getObjectIdType() != null && (!meta.isOpenJPAIdentity() || flags.name == null)) || getDeclaredPrimaryKeyFields(meta).length == 0) return; Class desc = meta.getDescribedType(); Class cls = null; if (flags.name != null) cls = loadClass(desc, flags.name, bc); else if (flags.suffix != null) cls = loadClass(desc, desc.getName() + flags.suffix, bc); meta.setObjectIdType(cls, false); }
/** * Set the object id type of the given metadata. */ private static void setObjectIdType(ClassMetaData meta, Flags flags, BCClassLoader bc) throws ClassNotFoundException { if (meta == null || (meta.getObjectIdType() != null && (!meta.isOpenJPAIdentity() || flags.name == null)) || getDeclaredPrimaryKeyFields(meta).length == 0) return; Class desc = meta.getDescribedType(); Class cls = null; if (flags.name != null) cls = loadClass(desc, flags.name, bc); else if (flags.suffix != null) cls = loadClass(desc, desc.getName() + flags.suffix, bc); meta.setObjectIdType(cls, false); }
if (_fields.length == 0) return ""; hasSuperclass = hasSuperclass && getDeclaredPrimaryKeyFields (_meta.getPCSuperclassMetaData()).length > 0;
if (_fields.length == 0) return ""; hasSuperclass = hasSuperclass && getDeclaredPrimaryKeyFields (_meta.getPCSuperclassMetaData()).length > 0;
if (hasSuperclass && getDeclaredPrimaryKeyFields (_meta.getPCSuperclassMetaData()).length > 0) { code.append("super.toString").parens();
if (hasSuperclass && getDeclaredPrimaryKeyFields (_meta.getPCSuperclassMetaData()).length > 0) { code.append("super.toString").parens();
if (hasSuperclass && getDeclaredPrimaryKeyFields (_meta.getPCSuperclassMetaData()).length > 0) { code.append("super.toString").parens();