Package org.jpox.store.mapped

Examples of org.jpox.store.mapped.IdentifierFactory.newIdentifier()


                        else
                        {
                            // Using field, so our real table will have an identifier of "THIS_{fieldName}"
                            fieldIdentifier += '.' + fieldName;
                        }
                        DatastoreIdentifier fieldRangeVar = idFactory.newIdentifier(IdentifierFactory.TABLE, fieldIdentifier);
                        LogicSetExpression fieldTblExpr = qs.newTableExpression(instanceofTable, fieldRangeVar);
                        ScalarExpression fieldExpr = table.getIDMapping().newScalarExpression(qs, te);
                        if (fieldName == null)
                        {
                            expr = instanceofTable.getIDMapping().newScalarExpression(qs, fieldTblExpr);
View Full Code Here


        if (colmd.getName() == null)
        {
            // No name specified, so generate the identifier from the field name
            if (roleForField == JavaTypeMapping.MAPPING_FIELD)
            {
                identifier = idFactory.newIdentifier(IdentifierFactory.COLUMN, fmd.getName());
                int i=0;
                while (datastoreContainer.hasDatastoreField(identifier))
                {
                    identifier = idFactory.newIdentifier(IdentifierFactory.COLUMN, fmd.getName() + "_" + i);
                    i++;
View Full Code Here

            {
                identifier = idFactory.newIdentifier(IdentifierFactory.COLUMN, fmd.getName());
                int i=0;
                while (datastoreContainer.hasDatastoreField(identifier))
                {
                    identifier = idFactory.newIdentifier(IdentifierFactory.COLUMN, fmd.getName() + "_" + i);
                    i++;
                }
            }
            else if (roleForField == JavaTypeMapping.MAPPING_COLLECTION_ELEMENT)
            {
View Full Code Here

        IdentifierFactory idFactory = datastoreContainer.getStoreManager().getIdentifierFactory();
        if (colmd.getName() == null)
        {
            // No name specified, so generate the identifier from the field name
            DatastoreIdentifier identifier = idFactory.newIdentifier(IdentifierFactory.COLUMN, fmd.getName());
            int i=0;
            while (datastoreContainer.hasDatastoreField(identifier))
            {
                identifier = idFactory.newIdentifier(IdentifierFactory.COLUMN, fmd.getName() + "_" + i);
                i++;
View Full Code Here

            // No name specified, so generate the identifier from the field name
            DatastoreIdentifier identifier = idFactory.newIdentifier(IdentifierFactory.COLUMN, fmd.getName());
            int i=0;
            while (datastoreContainer.hasDatastoreField(identifier))
            {
                identifier = idFactory.newIdentifier(IdentifierFactory.COLUMN, fmd.getName() + "_" + i);
                i++;
            }

            colmd.setName(identifier.getIdentifier());
            col = (Column) datastoreContainer.addDatastoreField(javaType, identifier, mapping, colmd);
View Full Code Here

                if (colmd.getJdbcType().equals("VARCHAR") && colmd.getLength() == null)
                {
                    colmd.setLength(getStoreManager().getOMFContext().getPersistenceConfiguration().getIntProperty("org.jpox.rdbms.stringDefaultLength"));
                }
                IdentifierFactory idFactory = getStoreManager().getIdentifierFactory();
                DatastoreIdentifier colIdentifier = idFactory.newIdentifier(IdentifierFactory.COLUMN, colmd.getName());
                Column col = (Column)addDatastoreField(null, colIdentifier, null, colmd);
                TypeInfo typeInfo = dba.getTypeInfo(JDBCUtils.getJDBCTypeForName(colmd.getJdbcType()));
                col.setTypeInfo(typeInfo);

                if (unmappedColumns == null)
View Full Code Here

        // Set the index name if required
        if (imd.getName() != null)
        {
            IdentifierFactory idFactory = table.getStoreManager().getIdentifierFactory();
            DatastoreIdentifier idxId = idFactory.newIdentifier(IdentifierFactory.INDEX, imd.getName());
            index.setName(idxId.toString());
        }

        // Field-level index so use all columns for the field
        int countFields = fieldMapping.getNumberOfDatastoreFields();
View Full Code Here

        // Set the key name if required
        if (umd.getName() != null)
        {
            IdentifierFactory idFactory = table.getStoreManager().getIdentifierFactory();
            DatastoreIdentifier ckId = idFactory.newIdentifier(IdentifierFactory.CANDIDATE_KEY, umd.getName());
            ck.setName(ckId.toString());
        }

        // Field-level index so use all columns for the field
        int countFields = fieldMapping.getNumberOfDatastoreFields();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.