Java Examples for org.hibernate.id.IdentifierGenerator

The following java examples will help you to understand the usage of org.hibernate.id.IdentifierGenerator. These source code samples are taken from different open source projects.

Example 1
Project: clinic-softacad-master  File: Configuration.java View source code
@SuppressWarnings({ "unchecked" })
private Iterator<IdentifierGenerator> iterateGenerators(Dialect dialect) throws MappingException {
    TreeMap generators = new TreeMap();
    String defaultCatalog = properties.getProperty(Environment.DEFAULT_CATALOG);
    String defaultSchema = properties.getProperty(Environment.DEFAULT_SCHEMA);
    for (PersistentClass pc : classes.values()) {
        if (!pc.isInherited()) {
            IdentifierGenerator ig = pc.getIdentifier().createIdentifierGenerator(getIdentifierGeneratorFactory(), dialect, defaultCatalog, defaultSchema, (RootClass) pc);
            if (ig instanceof PersistentIdentifierGenerator) {
                generators.put(((PersistentIdentifierGenerator) ig).generatorKey(), ig);
            } else if (ig instanceof IdentifierGeneratorAggregator) {
                ((IdentifierGeneratorAggregator) ig).registerPersistentGenerators(generators);
            }
        }
    }
    for (Collection collection : collections.values()) {
        if (collection.isIdentified()) {
            IdentifierGenerator ig = ((IdentifierCollection) collection).getIdentifier().createIdentifierGenerator(getIdentifierGeneratorFactory(), dialect, defaultCatalog, defaultSchema, null);
            if (ig instanceof PersistentIdentifierGenerator) {
                generators.put(((PersistentIdentifierGenerator) ig).generatorKey(), ig);
            }
        }
    }
    return generators.values().iterator();
}
Example 2
Project: hibernate-orm-master  File: InFlightMetadataCollectorImpl.java View source code
private void handleIdentifierValueBinding(KeyValue identifierValueBinding, Dialect dialect, String defaultCatalog, String defaultSchema, RootClass entityBinding) {
    //		it could be done better
    try {
        final IdentifierGenerator ig = identifierValueBinding.createIdentifierGenerator(getIdentifierGeneratorFactory(), dialect, defaultCatalog, defaultSchema, entityBinding);
        if (ig instanceof ExportableProducer) {
            ((ExportableProducer) ig).registerExportables(getDatabase());
        }
    } catch (MappingException e) {
        log.debugf("Ignoring exception thrown when trying to build IdentifierGenerator as part of Metadata building", e);
    }
}
Example 3
Project: beanlib-master  File: Hibernate4SequenceGenerator.java View source code
/** Returns the next sequence id from the specified sequence and session. */
public static long nextval(final String sequenceName, final Session session) {
    Object target = session;
    SessionImpl sessionImpl;
    if (target instanceof SessionImpl) {
        sessionImpl = (SessionImpl) target;
    } else {
        throw new IllegalStateException("Not yet know how to handle the given session!");
    }
    IdentifierGenerator idGenerator = createIdentifierGenerator(sequenceName, session);
    Serializable id = idGenerator.generate(sessionImpl, null);
    return (Long) id;
}
Example 4
Project: hibernate-ogm-master  File: SequenceNextValueGenerationTest.java View source code
@Override
protected IdSourceKey buildIdGeneratorKey(Class<?> entityClass, String sequenceName) {
    IdentifierGenerator metadata = generateKeyMetadata(entityClass);
    IdSourceKeyMetadata sequenceMetadata = ((OgmSequenceGenerator) metadata).getGeneratorKeyMetadata();
    if (dialect.supportsSequences()) {
        return IdSourceKey.forSequence(sequenceMetadata);
    } else {
        // Fallback to table generators
        return IdSourceKey.forTable(sequenceMetadata, sequenceName);
    }
}
Example 5
Project: jbosstools-hibernate-master  File: JavaDbGenericGeneratorImpl.java View source code
/**
	 * Method validates GenericGenerator.strategy. Generator strategy either a predefined Hibernate
	 * strategy or a fully qualified class name.
	 * 
	 * @param messages
	 * @param reporter
	 * @param astRoot
	 */
protected void validateStrategy(List<IMessage> messages, IReporter reporter) {
    if (this.strategy != null) {
        TextRange range = getStrategyTextRange() == null ? EmptyTextRange.instance() : getStrategyTextRange();
        if (this.strategy.trim().length() == 0) {
            messages.add(HibernateJpaValidationMessage.buildMessage(IMessage.HIGH_SEVERITY, STRATEGY_CANT_BE_EMPTY, getResource(), range));
        } else if (!generatorClasses.contains(this.strategy)) {
            IType lwType = null;
            try {
                lwType = getJpaProject().getJavaProject().findType(this.strategy);
                if (lwType == null || !lwType.isClass()) {
                    messages.add(HibernateJpaValidationMessage.buildMessage(IMessage.HIGH_SEVERITY, STRATEGY_CLASS_NOT_FOUND, new String[] { this.strategy }, getResource(), range));
                } else {
                    if (!JpaUtil.isTypeImplementsInterface(getJpaProject().getJavaProject(), lwType, "org.hibernate.id.IdentifierGenerator")) {
                        messages.add(HibernateJpaValidationMessage.buildMessage(IMessage.HIGH_SEVERITY, STRATEGY_INTERFACE, new String[] { this.strategy }, getResource(), range));
                    }
                }
            } catch (JavaModelException e) {
            }
        }
    }
}
Example 6
Project: ode-master  File: NativeHiLoGenerator.java View source code
public void configure(Type type, Properties params, Dialect dialect) throws MappingException {
    Class generatorClass = null;
    if (dialect.supportsSequences()) {
        __log.debug("Using SequenceHiLoGenerator");
        generatorClass = SequenceHiLoGenerator.class;
    } else {
        generatorClass = TableHiLoGenerator.class;
        __log.debug("Using native dialect generator " + generatorClass);
    }
    IdentifierGenerator g = null;
    try {
        g = (IdentifierGenerator) generatorClass.newInstance();
    } catch (Exception e) {
        throw new MappingException("", e);
    }
    if (g instanceof Configurable)
        ((Configurable) g).configure(type, params, dialect);
    this._proxy = g;
}
Example 7
Project: Hibernate-Core-3.5.6-Final-patched-with--True-Coalesce--enhancement-master  File: Configuration.java View source code
private Iterator iterateGenerators(Dialect dialect) throws MappingException {
    TreeMap generators = new TreeMap();
    String defaultCatalog = properties.getProperty(Environment.DEFAULT_CATALOG);
    String defaultSchema = properties.getProperty(Environment.DEFAULT_SCHEMA);
    Iterator iter = classes.values().iterator();
    while (iter.hasNext()) {
        PersistentClass pc = (PersistentClass) iter.next();
        if (!pc.isInherited()) {
            IdentifierGenerator ig = pc.getIdentifier().createIdentifierGenerator(getIdentifierGeneratorFactory(), dialect, defaultCatalog, defaultSchema, (RootClass) pc);
            if (ig instanceof PersistentIdentifierGenerator) {
                generators.put(((PersistentIdentifierGenerator) ig).generatorKey(), ig);
            } else if (ig instanceof IdentifierGeneratorAggregator) {
                ((IdentifierGeneratorAggregator) ig).registerPersistentGenerators(generators);
            }
        }
    }
    iter = collections.values().iterator();
    while (iter.hasNext()) {
        Collection collection = (Collection) iter.next();
        if (collection.isIdentified()) {
            IdentifierGenerator ig = ((IdentifierCollection) collection).getIdentifier().createIdentifierGenerator(getIdentifierGeneratorFactory(), dialect, defaultCatalog, defaultSchema, null);
            if (ig instanceof PersistentIdentifierGenerator) {
                generators.put(((PersistentIdentifierGenerator) ig).generatorKey(), ig);
            }
        }
    }
    return generators.values().iterator();
}
Example 8
Project: hibernate-core-3.6.x-mod-master  File: HqlSqlWalker.java View source code
protected void postProcessInsert(AST insert) throws SemanticException, QueryException {
    InsertStatement insertStatement = (InsertStatement) insert;
    insertStatement.validate();
    SelectClause selectClause = insertStatement.getSelectClause();
    Queryable persister = insertStatement.getIntoClause().getQueryable();
    if (!insertStatement.getIntoClause().isExplicitIdInsertion()) {
        // We need to generate ids as part of this bulk insert.
        //
        // Note that this is only supported for sequence-style generators and
        // post-insert-style generators; basically, only in-db generators
        IdentifierGenerator generator = persister.getIdentifierGenerator();
        if (!supportsIdGenWithBulkInsertion(generator)) {
            throw new QueryException("can only generate ids as part of bulk insert with either sequence or post-insert style generators");
        }
        AST idSelectExprNode = null;
        if (SequenceGenerator.class.isAssignableFrom(generator.getClass())) {
            String seqName = (String) ((SequenceGenerator) generator).generatorKey();
            String nextval = sessionFactoryHelper.getFactory().getDialect().getSelectSequenceNextValString(seqName);
            idSelectExprNode = getASTFactory().create(HqlSqlTokenTypes.SQL_TOKEN, nextval);
        } else {
        //Don't need this, because we should never ever be selecting no columns in an insert ... select...
        //and because it causes a bug on DB2
        /*String idInsertString = sessionFactoryHelper.getFactory().getDialect().getIdentityInsertString();
				if ( idInsertString != null ) {
					idSelectExprNode = getASTFactory().create( HqlSqlTokenTypes.SQL_TOKEN, idInsertString );
				}*/
        }
        if (idSelectExprNode != null) {
            AST currentFirstSelectExprNode = selectClause.getFirstChild();
            selectClause.setFirstChild(idSelectExprNode);
            idSelectExprNode.setNextSibling(currentFirstSelectExprNode);
            insertStatement.getIntoClause().prependIdColumnSpec();
        }
    }
    final boolean includeVersionProperty = persister.isVersioned() && !insertStatement.getIntoClause().isExplicitVersionInsertion() && persister.isVersionPropertyInsertable();
    if (includeVersionProperty) {
        // We need to seed the version value as part of this bulk insert
        VersionType versionType = persister.getVersionType();
        AST versionValueNode = null;
        if (sessionFactoryHelper.getFactory().getDialect().supportsParametersInInsertSelect()) {
            int sqlTypes[] = versionType.sqlTypes(sessionFactoryHelper.getFactory());
            if (sqlTypes == null || sqlTypes.length == 0) {
                throw new IllegalStateException(versionType.getClass() + ".sqlTypes() returns null or empty array");
            }
            if (sqlTypes.length > 1) {
                throw new IllegalStateException(versionType.getClass() + ".sqlTypes() returns > 1 element; only single-valued versions are allowed.");
            }
            versionValueNode = getASTFactory().create(HqlSqlTokenTypes.PARAM, "?");
            ParameterSpecification paramSpec = new VersionTypeSeedParameterSpecification(versionType);
            ((ParameterNode) versionValueNode).setHqlParameterSpecification(paramSpec);
            parameters.add(0, paramSpec);
            if (sessionFactoryHelper.getFactory().getDialect().requiresCastingOfParametersInSelectClause()) {
                // we need to wrtap the param in a cast()
                MethodNode versionMethodNode = (MethodNode) getASTFactory().create(HqlSqlTokenTypes.METHOD_CALL, "(");
                AST methodIdentNode = getASTFactory().create(HqlSqlTokenTypes.IDENT, "cast");
                versionMethodNode.addChild(methodIdentNode);
                versionMethodNode.initializeMethodNode(methodIdentNode, true);
                AST castExprListNode = getASTFactory().create(HqlSqlTokenTypes.EXPR_LIST, "exprList");
                methodIdentNode.setNextSibling(castExprListNode);
                castExprListNode.addChild(versionValueNode);
                versionValueNode.setNextSibling(getASTFactory().create(HqlSqlTokenTypes.IDENT, sessionFactoryHelper.getFactory().getDialect().getTypeName(sqlTypes[0])));
                processFunction(versionMethodNode, true);
                versionValueNode = versionMethodNode;
            }
        } else {
            if (isIntegral(versionType)) {
                try {
                    Object seedValue = versionType.seed(null);
                    versionValueNode = getASTFactory().create(HqlSqlTokenTypes.SQL_TOKEN, seedValue.toString());
                } catch (Throwable t) {
                    throw new QueryException("could not determine seed value for version on bulk insert [" + versionType + "]");
                }
            } else if (isDatabaseGeneratedTimestamp(versionType)) {
                String functionName = sessionFactoryHelper.getFactory().getDialect().getCurrentTimestampSQLFunctionName();
                versionValueNode = getASTFactory().create(HqlSqlTokenTypes.SQL_TOKEN, functionName);
            } else {
                throw new QueryException("cannot handle version type [" + versionType + "] on bulk inserts with dialects not supporting parameters in insert-select statements");
            }
        }
        AST currentFirstSelectExprNode = selectClause.getFirstChild();
        selectClause.setFirstChild(versionValueNode);
        versionValueNode.setNextSibling(currentFirstSelectExprNode);
        insertStatement.getIntoClause().prependVersionColumnSpec();
    }
    if (insertStatement.getIntoClause().isDiscriminated()) {
        String sqlValue = insertStatement.getIntoClause().getQueryable().getDiscriminatorSQLValue();
        AST discrimValue = getASTFactory().create(HqlSqlTokenTypes.SQL_TOKEN, sqlValue);
        insertStatement.getSelectClause().addChild(discrimValue);
    }
}
Example 9
Project: hibernate-core-ogm-master  File: Configuration.java View source code
@SuppressWarnings({ "unchecked" })
private Iterator<IdentifierGenerator> iterateGenerators(Dialect dialect) throws MappingException {
    TreeMap generators = new TreeMap();
    String defaultCatalog = properties.getProperty(Environment.DEFAULT_CATALOG);
    String defaultSchema = properties.getProperty(Environment.DEFAULT_SCHEMA);
    for (PersistentClass pc : classes.values()) {
        if (!pc.isInherited()) {
            IdentifierGenerator ig = pc.getIdentifier().createIdentifierGenerator(getIdentifierGeneratorFactory(), dialect, defaultCatalog, defaultSchema, (RootClass) pc);
            if (ig instanceof PersistentIdentifierGenerator) {
                generators.put(((PersistentIdentifierGenerator) ig).generatorKey(), ig);
            } else if (ig instanceof IdentifierGeneratorAggregator) {
                ((IdentifierGeneratorAggregator) ig).registerPersistentGenerators(generators);
            }
        }
    }
    for (Collection collection : collections.values()) {
        if (collection.isIdentified()) {
            IdentifierGenerator ig = ((IdentifierCollection) collection).getIdentifier().createIdentifierGenerator(getIdentifierGeneratorFactory(), dialect, defaultCatalog, defaultSchema, null);
            if (ig instanceof PersistentIdentifierGenerator) {
                generators.put(((PersistentIdentifierGenerator) ig).generatorKey(), ig);
            }
        }
    }
    return generators.values().iterator();
}
Example 10
Project: JavaQA-master  File: PlatformAnnotationConfiguration.java View source code
private Iterator iterateGenerators(Dialect dialect) throws MappingException {
    TreeMap generators = new TreeMap();
    String defaultCatalog = getProperty(Environment.DEFAULT_CATALOG);
    String defaultSchema = getProperty(Environment.DEFAULT_SCHEMA);
    Iterator iter = classes.values().iterator();
    while (iter.hasNext()) {
        PersistentClass pc = (PersistentClass) iter.next();
        if (!pc.isInherited()) {
            IdentifierGenerator ig = pc.getIdentifier().createIdentifierGenerator(new DefaultIdentifierGeneratorFactory(), dialect, defaultCatalog, defaultSchema, (RootClass) pc);
            if (ig instanceof PersistentIdentifierGenerator) {
                generators.put(((PersistentIdentifierGenerator) ig).generatorKey(), ig);
            }
        }
    }
    iter = collections.values().iterator();
    while (iter.hasNext()) {
        Collection collection = (Collection) iter.next();
        if (collection.isIdentified()) {
            IdentifierGenerator ig = ((IdentifierCollection) collection).getIdentifier().createIdentifierGenerator(new DefaultIdentifierGeneratorFactory(), dialect, defaultCatalog, defaultSchema, null);
            if (ig instanceof PersistentIdentifierGenerator) {
                generators.put(((PersistentIdentifierGenerator) ig).generatorKey(), ig);
            }
        }
    }
    return generators.values().iterator();
}
Example 11
Project: hibernate-tools-master  File: SchemaByMetaDataDetector.java View source code
/**
	 * 
	 * @param cfg 
	 * @return iterator over all the IdentifierGenerator's found in the entitymodel and return a list of unique IdentifierGenerators
	 * @throws MappingException
	 */
@SuppressWarnings("deprecation")
private Iterator<IdentifierGenerator> iterateGenerators() throws MappingException {
    TreeMap<Object, IdentifierGenerator> generators = new TreeMap<Object, IdentifierGenerator>();
    StandardServiceRegistryBuilder builder = new StandardServiceRegistryBuilder();
    Properties properties = (Properties) builder.getSettings();
    String defaultCatalog = properties.getProperty(AvailableSettings.DEFAULT_CATALOG);
    String defaultSchema = properties.getProperty(AvailableSettings.DEFAULT_SCHEMA);
    Iterator<PersistentClass> persistentClassIterator = getMetadata().getEntityBindings().iterator();
    while (persistentClassIterator.hasNext()) {
        PersistentClass pc = persistentClassIterator.next();
        if (!pc.isInherited()) {
            IdentifierGenerator ig = pc.getIdentifier().createIdentifierGenerator(getMetadata().getIdentifierGeneratorFactory(), dialect, defaultCatalog, defaultSchema, (RootClass) pc);
            if (ig instanceof PersistentIdentifierGenerator) {
                generators.put(((PersistentIdentifierGenerator) ig).generatorKey(), ig);
            }
        }
    }
    Iterator<?> collectionIterator = getMetadata().getCollectionBindings().iterator();
    while (collectionIterator.hasNext()) {
        Collection collection = (Collection) collectionIterator.next();
        if (collection.isIdentified()) {
            IdentifierGenerator ig = ((IdentifierCollection) collection).getIdentifier().createIdentifierGenerator(getMetadata().getIdentifierGeneratorFactory(), dialect, defaultCatalog, defaultSchema, null);
            if (ig instanceof PersistentIdentifierGenerator) {
                generators.put(((PersistentIdentifierGenerator) ig).generatorKey(), ig);
            }
        }
    }
    return generators.values().iterator();
}
Example 12
Project: SOS-master  File: CustomConfiguration.java View source code
/**
     * Copied from
     * {@link org.hibernate.cfg.Configuration#iterateGenerators(Dialect)}.
     */
private Iterator<PersistentIdentifierGenerator> iterateGenerators(final Dialect d, final String c, final String s) throws MappingException {
    final TreeMap<Object, PersistentIdentifierGenerator> generators = new TreeMap<Object, PersistentIdentifierGenerator>();
    for (final PersistentClass pc : classes.values()) {
        if (!pc.isInherited()) {
            final IdentifierGenerator ig = pc.getIdentifier().createIdentifierGenerator(getIdentifierGeneratorFactory(), d, c, s, (RootClass) pc);
            if (ig instanceof PersistentIdentifierGenerator) {
                final PersistentIdentifierGenerator pig = (PersistentIdentifierGenerator) ig;
                generators.put(pig.generatorKey(), pig);
            } else if (ig instanceof IdentifierGeneratorAggregator) {
                ((IdentifierGeneratorAggregator) ig).registerPersistentGenerators(generators);
            }
        }
    }
    for (final Collection collection : collections.values()) {
        if (collection.isIdentified()) {
            final IdentifierGenerator ig = ((IdentifierCollection) collection).getIdentifier().createIdentifierGenerator(getIdentifierGeneratorFactory(), d, c, s, null);
            if (ig instanceof PersistentIdentifierGenerator) {
                final PersistentIdentifierGenerator pig = (PersistentIdentifierGenerator) ig;
                generators.put(pig.generatorKey(), pig);
            }
        }
    }
    return generators.values().iterator();
}
Example 13
Project: hq-master  File: MeasurementTemplateDAO.java View source code
public void createTemplates(final String pluginName, final Map<MonitorableType, List<MonitorableMeasurementInfo>> toAdd) {
    final IdentifierGenerator tmplIdGenerator = ((SessionFactoryImpl) sessionFactory).getEntityPersister(MeasurementTemplate.class.getName()).getIdentifierGenerator();
    final String templatesql = "INSERT INTO EAM_MEASUREMENT_TEMPL " + "(id, name, alias, units, collection_type, default_on, " + "default_interval, designate, monitorable_type_id, " + "category_id, template, plugin, ctime, mtime) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
    final List<MonitorableMeasurementInfo> combinedInfos = new ArrayList<MonitorableMeasurementInfo>();
    for (List<MonitorableMeasurementInfo> info : toAdd.values()) {
        combinedInfos.addAll(info);
    }
    final long current = System.currentTimeMillis();
    //We need JdbcTemplate to throw runtime Exception to roll back tx if batch update fails, else we'll get partial write
    jdbcTemplate.batchUpdate(templatesql, new BatchPreparedStatementSetter() {

        HashMap<String, Category> cats = new HashMap<String, Category>();

        public void setValues(PreparedStatement stmt, int i) throws SQLException {
            MeasurementInfo info = combinedInfos.get(i).getMeasurementInfo();
            Category cat = (Category) cats.get(info.getCategory());
            if (cat == null) {
                cat = catDAO.findByName(info.getCategory());
                if (cat == null) {
                    cat = catDAO.create(info.getCategory());
                }
                cats.put(info.getCategory(), cat);
            }
            Integer rawid = (Integer) tmplIdGenerator.generate((SessionImpl) getSession(), new MeasurementTemplate());
            stmt.setInt(1, rawid.intValue());
            stmt.setString(2, info.getName());
            String alias = info.getAlias();
            if (alias.length() > ALIAS_LIMIT) {
                alias = alias.substring(0, ALIAS_LIMIT);
                log.warn("ALIAS field of EAM_MEASUREMENT_TEMPLATE truncated: original value was " + info.getAlias() + ", truncated value is " + alias);
            }
            stmt.setString(3, alias);
            stmt.setString(4, info.getUnits());
            stmt.setInt(5, info.getCollectionType());
            stmt.setBoolean(6, info.isDefaultOn());
            stmt.setLong(7, info.getInterval());
            stmt.setBoolean(8, info.isIndicator());
            stmt.setInt(9, combinedInfos.get(i).getMonitorableType().getId().intValue());
            stmt.setInt(10, cat.getId().intValue());
            stmt.setString(11, info.getTemplate());
            stmt.setString(12, pluginName);
            stmt.setLong(13, current);
            stmt.setLong(14, current);
        }

        public int getBatchSize() {
            return combinedInfos.size();
        }
    });
}
Example 14
Project: breeze.server.java-master  File: HibernateMetadata.java View source code
/**
     * Add the metadata for an entity.
     * 
     * @param meta
     */
void addClass(ClassMetadata meta) {
    Class type = meta.getMappedClass();
    String classKey = getEntityTypeName(type);
    HashMap<String, Object> cmap = new LinkedHashMap<String, Object>();
    _typeList.add(cmap);
    cmap.put("shortName", type.getSimpleName());
    cmap.put("namespace", type.getPackage().getName());
    EntityMetamodel metaModel = ((EntityPersister) meta).getEntityMetamodel();
    String superTypeName = metaModel.getSuperclass();
    if (superTypeName != null) {
        ClassMetadata superMeta = _sessionFactory.getClassMetadata(superTypeName);
        if (superMeta != null) {
            Class superClass = superMeta.getMappedClass();
            cmap.put("baseTypeName", getEntityTypeName(superClass));
        }
    }
    String genType = "None";
    if (meta instanceof EntityPersister) {
        EntityPersister entityPersister = (EntityPersister) meta;
        // multipart keys can never have an AutoGeneratedKeyType
        if (entityPersister.hasIdentifierProperty()) {
            IdentifierGenerator generator = entityPersister != null ? entityPersister.getIdentifierGenerator() : null;
            if (generator != null) {
                if (generator instanceof IdentityGenerator) {
                    genType = "Identity";
                } else if (generator instanceof Assigned || generator instanceof ForeignGenerator) {
                    genType = "None";
                } else {
                    genType = "KeyGenerator";
                }
            // TODO find the real generator
            }
        }
    }
    cmap.put("autoGeneratedKeyType", genType);
    // TODO find the real name
    String resourceName = pluralize(type.getSimpleName());
    cmap.put("defaultResourceName", resourceName);
    _resourceMap.put(resourceName, classKey);
    ArrayList<HashMap<String, Object>> dataArrayList = new ArrayList<HashMap<String, Object>>();
    cmap.put("dataProperties", dataArrayList);
    ArrayList<HashMap<String, Object>> navArrayList = new ArrayList<HashMap<String, Object>>();
    cmap.put("navigationProperties", navArrayList);
    addClassProperties(meta, dataArrayList, navArrayList);
}
Example 15
Project: hibernate-semantic-query-master  File: CollectionId.java View source code
public IdentifierGenerator getGenerator() {
    return generator;
}
Example 16
Project: owsi-core-parent-master  File: PostgreSQLAdvancedDialect.java View source code
@Override
public Class<? extends IdentifierGenerator> getNativeIdentifierGeneratorClass() {
    return PostgreSQLSequenceStyleGenerator.class;
}
Example 17
Project: jbpm3-seam-master  File: MockSessionFactory.java View source code
public IdentifierGenerator getIdentifierGenerator(String rootEntityName) {
    throw new UnsupportedOperationException();
}
Example 18
Project: lemon-master  File: SessionFactoryWrapper.java View source code
public IdentifierGenerator getIdentifierGenerator(String rootEntityName) {
    return sessionFactoryImplementor.getIdentifierGenerator(rootEntityName);
}
Example 19
Project: cloudtm-data-platform-master  File: OgmSessionFactory.java View source code
@Override
public IdentifierGenerator getIdentifierGenerator(String rootEntityName) {
    return delegate.getIdentifierGenerator(rootEntityName);
}
Example 20
Project: hibernate-ogm-old-master  File: OgmSessionFactory.java View source code
@Override
public IdentifierGenerator getIdentifierGenerator(String rootEntityName) {
    return delegate.getIdentifierGenerator(rootEntityName);
}
Example 21
Project: qcadoo-master  File: DynamicSessionFactory.java View source code
@Override
public IdentifierGenerator getIdentifierGenerator(final String rootEntityName) {
    return ((SessionFactoryImplementor) getSessionFactory(false)).getIdentifierGenerator(rootEntityName);
}