Package org.jpox.store.mapped

Examples of org.jpox.store.mapped.FetchStatement.select()


            {
                FetchStatement subQuery = mainTable.getStoreManager().getFetchStatement(mainTable);
                Iterator i = columns.iterator();
                while (i.hasNext())
                {
                    subQuery.select((DatastoreField)i.next());
                }

                // Assumed to not want any locking in this statement
                sb.append('(').append(subQuery.toString(false)).append(") ").append(mainAlias);
            }
View Full Code Here


            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()) + " = ?");
        }
View Full Code Here

            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()) + " = ?");
        }
View Full Code Here

        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
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.