Package org.jpox.store.rdbms

Examples of org.jpox.store.rdbms.RDBMSFetchStatement$OuterJoinDefinition


            DatastoreContainerObject datastoreContainer,
            DatastoreMapping mapping,
            byte[] bytes)
    {
        // Generate "SELECT {blobColumn} FROM TABLE WHERE ID=? FOR UPDATE" statement
        FetchStatement fetchStmt = new RDBMSFetchStatement(datastoreContainer);
        fetchStmt.select(mapping.getDatastoreField());
        JavaTypeMapping idMapping = datastoreContainer.getIDMapping();
        for (int i = 0; i < idMapping.getNumberOfDatastoreFields(); i++)
        {
            fetchStmt.andCondition(fetchStmt.referenceDatastoreField(idMapping.getDataStoreMapping(i).getDatastoreField()) + " = ?");
        }
        String textStmt = fetchStmt.toString(true);

        if (sm.getPcObjectType() != StateManager.PC)
        {
            // This mapping is embedded, so navigate back to the real owner since that is the "id" in the table
            StateManager[] embeddedOwners = sm.getEmbeddedOwners();
View Full Code Here


            DatastoreContainerObject datastoreContainer,
            DatastoreMapping mapping,
            String value)
    {
        // Generate "SELECT {clobColumn} FROM TABLE WHERE ID=? FOR UPDATE" statement
        FetchStatement fetchStmt = new RDBMSFetchStatement(datastoreContainer);
        fetchStmt.select(mapping.getDatastoreField());
        JavaTypeMapping idMapping = datastoreContainer.getIDMapping();
        for (int i = 0; i < idMapping.getNumberOfDatastoreFields(); i++)
        {
            fetchStmt.andCondition(fetchStmt.referenceDatastoreField(idMapping.getDataStoreMapping(i).getDatastoreField()) + " = ?");
        }
        String textStmt = fetchStmt.toString(true);

        if (sm.getPcObjectType() != StateManager.PC)
        {
            // This mapping is embedded, so navigate back to the real owner since that is the "id" in the table
            StateManager[] embeddedOwners = sm.getEmbeddedOwners();
View Full Code Here

        }
        this.table = candidateTable;
        this.key = ((AbstractClassTable)table).getPrimaryKey();

        mappingStatementIndex = new MappingStatementIndex();
        fetchStatement = new RDBMSFetchStatement(table);

        // Extract the fields to be retrieved
        consumer = new FetchMappingConsumer(fetchStatement, cmd, clr);

        // Include any datastore id mapping for the candidate table
View Full Code Here

         * Default constructor
         */
        public VersionMappingConsumer(AbstractClassMetaData cmd, AbstractClassTable table)
        {
            this.cmd = cmd;
            fetchStmt = new RDBMSFetchStatement(table.getPrimaryDatastoreContainerObject());
            versionMappingStatementIndex = new MappingStatementIndex();

            // Consume the mappings for the table so we can build the statement
            if (versionMetaData.getFieldName() != null)
            {
View Full Code Here

    public LocateRequest(DatastoreClass table)
    {
        super(table);

        mappingStatementIndex = new MappingStatementIndex();
        FetchStatement fetchStmt = new RDBMSFetchStatement(table);
        FetchMappingConsumer consumer = new FetchMappingConsumer(fetchStmt);
        fetchStmt.select("1");
        table.provideDatastoreIdMappings(consumer);
        table.providePrimaryKeyMappings(consumer);

        locateStmt = fetchStmt.toString();
        pkFieldNumbers = consumer.getPrimaryKeyFieldNumbers();
    }
View Full Code Here

TOP

Related Classes of org.jpox.store.rdbms.RDBMSFetchStatement$OuterJoinDefinition

Copyright © 2018 www.massapicom. 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.