Package org.apache.ojb.odmg.oql

Examples of org.apache.ojb.odmg.oql.OQLQueryImpl


    }

    public EnhancedOQLQuery newOQLQuery(int lock)
    {
        checkTransaction("newOQLQuery");
        OQLQueryImpl query = new OTMOQLQueryImpl(_pb.getPBKey(), lock);
        try
        {
            m_configurator.configure(query);
        }
        catch (ConfigurationException e)
View Full Code Here


    {
        if ((getCurrentDatabase() == null) || !getCurrentDatabase().isOpen())
        {
            throw new DatabaseClosedException("Database is not open");
        }
        return new OQLQueryImpl(this);
    }
View Full Code Here

    {
        if ((getCurrentDatabase() == null) || !getCurrentDatabase().isOpen())
        {
            throw new DatabaseClosedException("Database is not open");
        }
        OQLQueryImpl query = new OQLQueryImpl(this.getCurrentPBKey());
        try
        {
            getConfigurator().configure(query);
        }
        catch (ConfigurationException e)
View Full Code Here

    }

    public EnhancedOQLQuery newOQLQuery(int lock)
    {
        checkTransaction("newOQLQuery");
        OQLQueryImpl query = new OTMOQLQueryImpl(_pb.getPBKey(), lock);
        try
        {
            m_configurator.configure(query);
        }
        catch (ConfigurationException e)
View Full Code Here

     */
    public org.odmg.DCollection query(String predicate) throws org.odmg.QueryInvalidException
    {
        // 1.build complete OQL statement
        String oql = "select all from java.lang.Object where " + predicate;
        OQLQuery predicateQuery = new OQLQueryImpl(pbKey, this.getClass());

        Transaction tx = getTransaction();
        PBCapsule capsule = new PBCapsule(pbKey, tx);
        PersistenceBroker broker = capsule.getBroker();

        try
        {
            predicateQuery.create(oql);
            Query pQ = ((OQLQueryImpl) predicateQuery).getQuery();
            Criteria pCrit = pQ.getCriteria();

            Criteria allElementsCriteria = this.getPkCriteriaForAllElements(broker);
            // join selection of elements with predicate criteria:
View Full Code Here

    public DCollection query(String predicate) throws QueryInvalidException
    {
        // 1.build complete OQL statement
        String oql = "select all from java.lang.Object where " + predicate;
        /*TODO: Use a ObjectFactory to instantiate OQLQuery? */
        OQLQuery predicateQuery = new OQLQueryImpl(pbKey, this.getClass());
        predicateQuery.create(oql);
        Query pQ = ((OQLQueryImpl) predicateQuery).getQuery();
        Criteria pCrit = pQ.getCriteria();

        Transaction tx = TxManagerFactory.instance().getTransaction();
        if (tx == null) throw new QueryInvalidException("Need running transaction to do query");
View Full Code Here

    {
        if ((getCurrentDatabase() == null) || !getCurrentDatabase().isOpen())
        {
            throw new DatabaseClosedException("Database is not open");
        }
        OQLQueryImpl query = new OQLQueryImpl(this.getCurrentPBKey(), getOqlCollectionClass());
        return query;

    }
View Full Code Here

    public DCollection query(String predicate) throws org.odmg.QueryInvalidException
    {
        // 1.build complete OQL statement
        String oql = "select all from java.lang.Object where " + predicate;
        /* @todo Use a ObjectFactory to instantiate OQLQuery? */
        OQLQuery predicateQuery = new OQLQueryImpl(pbKey, this.getClass());
        predicateQuery.create(oql);
        Query pQ = ((OQLQueryImpl) predicateQuery).getQuery();
        Criteria pCrit = pQ.getCriteria();

        PBCapsule handle = new PBCapsule(pbKey, TxManagerFactory.instance().getTransaction());
        DList result;
View Full Code Here

    {
        if ((getCurrentDatabase() == null) || !getCurrentDatabase().isOpen())
        {
            throw new DatabaseClosedException("Database is not open");
        }
        OQLQueryImpl query = new OQLQueryImpl(this.getCurrentPBKey());
        try
        {
            getConfigurator().configure(query);
        }
        catch (ConfigurationException e)
View Full Code Here

    public DCollection query(String predicate) throws org.odmg.QueryInvalidException
    {
        // 1.build complete OQL statement
        String oql = "select all from java.lang.Object where " + predicate;
        /* @todo Use a ObjectFactory to instantiate OQLQuery? */
        OQLQuery predicateQuery = new OQLQueryImpl(pbKey);
        predicateQuery.create(oql);
        Query pQ = ((OQLQueryImpl) predicateQuery).getQuery();
        Criteria pCrit = pQ.getCriteria();

        PBCapsule handle = new PBCapsule(pbKey, TxManagerFactory.instance().getTransaction());
        DList result;
View Full Code Here

TOP

Related Classes of org.apache.ojb.odmg.oql.OQLQueryImpl

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.