Examples of NumberKey


Examples of org.apache.torque.om.NumberKey

        try
        {
            TurbinePermission tpermission = new TurbinePermission();
            tpermission.setPermissionName(permission.getName());
            Criteria criteria = TurbinePermissionPeer.buildCriteria(tpermission);
            NumberKey key = (NumberKey)TurbinePermissionPeer.doInsert(criteria);
            permission.setId(key.toString());
        }
        catch(Exception e)
        {
            String message = "Failed to create permission '" + permission.getName() + "'";
            logger.error( message, e );
View Full Code Here

Examples of org.apache.torque.om.NumberKey

        try
        {
            TurbineGroup tgroup = new TurbineGroup();
            tgroup.setGroupName(group.getName());
            Criteria criteria = TurbineGroupPeer.buildCriteria(tgroup);
            NumberKey key = (NumberKey)TurbineGroupPeer.doInsert(criteria);
            group.setId(key.toString());
        }
        catch(Exception e)
        {
            throw new GroupException("Failed to create group '" +
                group.getName() + "'", e);
View Full Code Here

Examples of org.apache.torque.om.NumberKey

        try
        {
            TurbineRole trole = new TurbineRole();
            trole.setRoleName(role.getName());
            Criteria criteria = TurbineRolePeer.buildCriteria(trole);
            NumberKey key = (NumberKey)TurbineRolePeer.doInsert(criteria);
            role.setId(key.toString());
        }
        catch(Exception e)
        {
            throw new RoleException("Failed to create role '" +
                role.getName() + "'", e);
View Full Code Here

Examples of org.apache.torque.om.NumberKey

        Constraint constraint = (Constraint) paramMap.get(MIN_VALUE_RULE_NAME);
        if (constraint != null)
        {
            String param = constraint.getValue();
            minValue = new NumberKey(param);
            minValueMessage = constraint.getMessage();
        }

        constraint = (Constraint) paramMap.get(MAX_VALUE_RULE_NAME);
        if (constraint != null)
        {
            String param = constraint.getValue();
            maxValue = new NumberKey(param);
            maxValueMessage = constraint.getMessage();
        }
    }
View Full Code Here

Examples of org.apache.torque.om.NumberKey

     * testValue did not pass the validation tests.
     */
    public void assertValidity(String testValue)
            throws ValidationException
    {
        NumberKey nk = null;
        try
        {
            nk = new NumberKey(testValue);
        }
        catch (RuntimeException e)
        {
            errorMessage = invalidNumberMessage;
            throw new ValidationException(invalidNumberMessage);
        }
        if (minValue != null && nk.compareTo(minValue) < 0)
        {
            errorMessage = minValueMessage;
            throw new ValidationException(minValueMessage);
        }
        if (maxValue != null && nk.compareTo(maxValue) > 0)
        {
            errorMessage = maxValueMessage;
            throw new ValidationException(maxValueMessage);
        }
    }
View Full Code Here

Examples of org.apache.torque.om.NumberKey

                    objectDataPosition = i + 1;
                }
            }

            ((Persistent) obj).setPrimaryKey(
                new NumberKey(row.getValue(idPosition).asBigDecimal()));

            // Restore the Permanent Storage Hashtable.  First the
            // Hashtable is restored, then any explicit table columns
            // which should be included in the Hashtable are added.
            byte[] objectData = row.getValue(objectDataPosition).asBytes();
View Full Code Here

Examples of org.apache.torque.om.NumberKey

            for (int i = 0; i < rows.size(); i++)
            {
                Permission obj = TurbineSecurity.getPermissionInstance(null);
                Record row = (Record) rows.get(i);
                ((TurbinePermission) obj).setPrimaryKey(
                        new NumberKey(row.getValue(1).asInt()));
                ((TurbinePermission) obj).setName(row.getValue(2).asString());
               
                // TODO: Clean up OBJECTDATA columns. They are no longer supported
                /*
                byte[] objectData = row.getValue(3).asBytes();
View Full Code Here

Examples of org.apache.torque.om.NumberKey

            {
                //Role obj = new Role();
                Role obj = new TurbineRole();
                Record row = (Record) rows.get(i);
                ((TurbineRole) obj).setPrimaryKey(
                        new NumberKey(row.getValue(1).asInt()));
                ((TurbineRole) obj).setName(row.getValue(2).asString());
               
                // TODO: Clean up OBJECTDATA columns. They are no longer supported
                /*
                byte[] objectData = row.getValue(3).asBytes();
View Full Code Here

Examples of org.apache.torque.om.NumberKey

            for (int i = 0; i < rows.size(); i++)
            {
                Group obj = TurbineSecurity.getGroupInstance(null);
                Record row = (Record) rows.get(i);
                ((TurbineGroup) obj).setPrimaryKey(
                        new NumberKey(row.getValue(1).asInt()));
                ((TurbineGroup) obj).setName(row.getValue(2).asString());
               
                // TODO: Clean up OBJECTDATA columns. They are no longer supported
                /*
                byte[] objectData = row.getValue(3).asBytes();
View Full Code Here

Examples of org.apache.torque.om.NumberKey

     * @return A NumberKey, or <code>null</code> if unparsable.
     * @deprecated no replacement
     */
    public NumberKey getNumberKey(String name)
    {
        NumberKey result = null;
        try
        {
            String value = StringUtils.trim(getString(name));
            if (StringUtils.isNotEmpty(value))
            {
                result = new NumberKey(value);
            }
        }
        catch (ClassCastException e)
        {
            log.error("Parameter ("
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.