Package org.apache.torque.om

Examples of org.apache.torque.om.ObjectKey


     *
     * @return an <code>int</code> value
     */
    public int hashCode()
    {
        ObjectKey ok = getPrimaryKey();
        if (ok == null)
        {
            return super.hashCode();
        }

        return ok.hashCode();
    }
View Full Code Here


        {
            Criteria criteria = new Criteria();
            Iterator<ObjectKey> iter = pks.iterator();
            while (iter.hasNext())
            {
                ObjectKey pk =  iter.next();
                SimpleKey[] keys = (SimpleKey[])pk.getValue();
                    Criteria.Criterion c0 = criteria.getNewCriterion(
                        ROLE_ID, keys[0], Criteria.EQUAL);
                    Criteria.Criterion c1 = criteria.getNewCriterion(
                        PERMISSION_ID, keys[1], Criteria.EQUAL);
                        c0.and(c1);
View Full Code Here

        {
            Criteria criteria = new Criteria();
            Iterator<ObjectKey> iter = pks.iterator();
            while (iter.hasNext())
            {
                ObjectKey pk =  iter.next();
                SimpleKey[] keys = (SimpleKey[])pk.getValue();
                    Criteria.Criterion c0 = criteria.getNewCriterion(
                        USER_ID, keys[0], Criteria.EQUAL);
                    Criteria.Criterion c1 = criteria.getNewCriterion(
                        GROUP_ID, keys[1], Criteria.EQUAL);
                        c0.and(c1);
View Full Code Here

     *
     * @return an <code>int</code> value
     */
    public int hashCode()
    {
        ObjectKey ok = getPrimaryKey();
        if (ok == null)
        {
            return super.hashCode();
        }

        return ok.hashCode();
    }
View Full Code Here

     *         rethrown wrapped into a TorqueException.
     */
    protected Persistent putInstanceImpl(Persistent om)
        throws TorqueException
    {
        ObjectKey key = om.getPrimaryKey();
        return putInstanceImpl(key, om);
    }
View Full Code Here

            // start a new list where we will replace the id's with om's
            oms = new ArrayList(ids);
            List newIds = new ArrayList(ids.size());
            for (int i = 0; i < ids.size(); i++)
            {
                ObjectKey key = (ObjectKey) ids.get(i);
                Persistent om = null;
                if (fromCache)
                {
                    om = cacheGet(key);
                }
View Full Code Here

     *         rethrown wrapped into a TorqueException.
     */
    public static ObjectKey doInsert(Criteria criteria) throws TorqueException
    {
        Connection con = null;
        ObjectKey id = null;

        try
        {
            con = Transaction.beginOptional(
                    criteria.getDbName(),
View Full Code Here

     *         rethrown wrapped into a TorqueException.
     */
    public static ObjectKey doInsert(Criteria criteria) throws TorqueException
    {
        Connection con = null;
        ObjectKey id = null;

        try
        {
            con = Transaction.beginOptional(
                    criteria.getDbName(),
View Full Code Here

     *         rethrown wrapped into a TorqueException.
     */
    protected Persistent putInstanceImpl(Persistent om)
        throws TorqueException
    {
        ObjectKey key = om.getPrimaryKey();
        return putInstanceImpl(key, om);
    }
View Full Code Here

            // start a new list where we will replace the id's with om's
            oms = new ArrayList(ids);
            List newIds = new ArrayList(ids.size());
            for (int i = 0; i < ids.size(); i++)
            {
                ObjectKey key = (ObjectKey) ids.get(i);
                Persistent om = null;
                if (fromCache)
                {
                    om = cacheGet(key);
                }
View Full Code Here

TOP

Related Classes of org.apache.torque.om.ObjectKey

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.