Package org.jpox.store.rdbms

Examples of org.jpox.store.rdbms.RDBMSManager$MgmtTransaction


        }

        try
        {
            ObjectManager om = sm.getObjectManager();
            RDBMSManager storeMgr = (RDBMSManager)om.getStoreManager();
            ManagedConnection mconn = storeMgr.getConnection(om);
            SQLController sqlControl = storeMgr.getSQLController();

            try
            {
                PreparedStatement ps = sqlControl.getStatementForQuery(mconn, textStmt);
                try
View Full Code Here


        }

        try
        {
            ObjectManager om = sm.getObjectManager();
            RDBMSManager storeMgr = (RDBMSManager)om.getStoreManager();
            ManagedConnection mconn = storeMgr.getConnection(om);
            SQLController sqlControl = storeMgr.getSQLController();

            try
            {
                PreparedStatement ps = sqlControl.getStatementForQuery(mconn, textStmt);
View Full Code Here

    protected synchronized PoidBlock reserveBlock(long size)
    {
        PreparedStatement ps = null;
        ResultSet rs = null;
        List oid = new ArrayList();
        RDBMSManager srm = (RDBMSManager)storeMgr;
        SQLController sqlControl = srm.getSQLController();
        try
        {
            // Find the next ID from the database
            RDBMSAdapter dba = (RDBMSAdapter) srm.getDatastoreAdapter();

            String stmt = dba.getSelectNewUUIDStmt();

            ps = sqlControl.getStatementForQuery(connection, stmt);
            for (int i=1; i<size; i++)
View Full Code Here

    public PoidBlock reserveBlock(long size)
    {
        // search an Id in the database
        PreparedStatement ps = null;
        ResultSet rs = null;
        RDBMSManager rdbmsMgr = (RDBMSManager)storeMgr;
        SQLController sqlControl = rdbmsMgr.getSQLController();
        try
        {
            String stmt = getStatement();
            ps = sqlControl.getStatementForUpdate(connection, stmt, false);
View Full Code Here

        }

        PreparedStatement ps = null;
        ResultSet rs = null;
        List oid = new ArrayList();
        RDBMSManager srm = (RDBMSManager)storeMgr;
        SQLController sqlControl = srm.getSQLController();
        try
        {
            // Get next available id
            RDBMSAdapter dba = (RDBMSAdapter) srm.getDatastoreAdapter();

            String stmt = dba.getSequenceNextStmt(getSequenceName());
            ps = sqlControl.getStatementForQuery(connection, stmt);
            rs = sqlControl.executeStatementQuery(connection, stmt, ps);
View Full Code Here

            if (sequenceSchemaName == null)
            {
                sequenceSchemaName = properties.getProperty("schema-name");
            }
            String sequenceName = properties.getProperty("sequence-name");
            RDBMSManager srm = (RDBMSManager)storeMgr;
            RDBMSIdentifierFactory idFactory = (RDBMSIdentifierFactory)srm.getIdentifierFactory();
            SQLIdentifier identifier = (SQLIdentifier)idFactory.newSequenceIdentifier(sequenceName);
            if (((RDBMSAdapter)srm.getDatastoreAdapter()).supportsCatalogsInTableDefinitions() && sequenceCatalogName != null)
            {
                identifier.setCatalogName(sequenceCatalogName);
            }
            if (((RDBMSAdapter)srm.getDatastoreAdapter()).supportsSchemasInTableDefinitions() && sequenceSchemaName != null)
            {
                identifier.setSchemaName(sequenceSchemaName);
            }
            this.sequenceName = identifier.getFullyQualifiedName(true);
        }
View Full Code Here

     * @return Whether it was created successfully.
     */
    protected boolean createRepository()
    {
        PreparedStatement ps = null;
        RDBMSManager srm = (RDBMSManager)storeMgr;
        RDBMSAdapter dba = (RDBMSAdapter)srm.getDatastoreAdapter();
        SQLController sqlControl = srm.getSQLController();

        String stmt = dba.getSequenceCreateStmt(getSequenceName(),
                    (String) properties.get("key-min-value"),
                    (String) properties.get("key-max-value"),
                    (String) properties.get("key-start-with"),
View Full Code Here

        }

        QueryResult qr = null;
        try
        {
            RDBMSManager storeMgr = (RDBMSManager)om.getStoreManager();
            ManagedConnection mconn = storeMgr.getConnection(om);
           
            SQLController sqlControl = storeMgr.getSQLController();

            try
            {
                StatementText stmtText = null;
                if (query.getType() == Query.SELECT)
View Full Code Here

        {
            // No range specified so dont apply checks!
            return false;
        }

        RDBMSManager storeMgr = (RDBMSManager)om.getStoreManager();
        RDBMSAdapter dba = (RDBMSAdapter)storeMgr.getDatastoreAdapter();
        boolean using_limit_select_clause = (dba.getRangeByLimitSelectClause(fromInclNo, toExclNo).length() > 0);
        boolean using_limit_where_clause = (dba.getRangeByLimitWhereClause(fromInclNo, toExclNo).length() > 0);
        boolean using_rownum = (dba.getRangeByRowNumberColumn().length() > 0);
        boolean applyRangeChecks =
            (range_specified && !using_limit_select_clause && !using_limit_where_clause && !using_rownum);
View Full Code Here

        public Object evaluate(QueryExpression queryStmt)
        {
            QueryResult qr = null;
            try
            {
                RDBMSManager storeMgr = (RDBMSManager)om.getStoreManager();
                DatastoreAdapter dba = storeMgr.getDatastoreAdapter();
                ManagedConnection mconn = storeMgr.getConnection(om);
                Connection conn = (Connection) mconn.getConnection();
                SQLController sqlControl = storeMgr.getSQLController();

                try
                {
                    PreparedStatement ps = conn.prepareStatement(compiledSQL);
                    try
View Full Code Here

TOP

Related Classes of org.jpox.store.rdbms.RDBMSManager$MgmtTransaction

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.