Package org.apache.torque.om

Examples of org.apache.torque.om.ObjectKey


        Criteria criteria = TurbineUserPeer.buildCriteria(user);
        try
        {
            // perform the insert to the database
            ObjectKey pk = TurbineUserPeer.doInsert(criteria);

            // update the user object with the primary key
            TurbineMapBuilder mapbuilder = (TurbineMapBuilder)
                    TurbineUserPeer.getMapBuilder("org.apache.turbine.util.db.map.TurbineMapBuilder");
            user.setPerm(mapbuilder.getUserId(), pk);
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

        {
            Criteria criteria = new Criteria();
              Iterator iter = pks.iterator();
            while (iter.hasNext())
            {
                ObjectKey pk = (ObjectKey)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

        {
            Criteria criteria = new Criteria();
              Iterator iter = pks.iterator();
            while (iter.hasNext())
            {
                ObjectKey pk = (ObjectKey)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 iter = pks.iterator();
            while (iter.hasNext())
            {
                ObjectKey pk = (ObjectKey)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

        {
            Criteria criteria = new Criteria();
              Iterator iter = pks.iterator();
            while (iter.hasNext())
            {
                ObjectKey pk = (ObjectKey)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

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.