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

     *         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

     *
     * @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

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.