Examples of NumberKey


Examples of org.apache.torque.om.NumberKey

        if (prop == null)
        {
            return;
        }

        defaultValue = new NumberKey(prop);
    }
View Full Code Here

Examples of org.apache.torque.om.NumberKey

        if (prop == null)
        {
            return;
        }

        emptyValue = new NumberKey(prop);
    }
View Full Code Here

Examples of org.apache.torque.om.NumberKey

            for (int i = 0; i < inputs.length; i++)
            {
                values[i] = inputs[i] == null
                        ? (NumberKey) getEmptyValue()
                        : new NumberKey(inputs[i]);
            }

            setTestValue(values);
        }
        else
        {
            BigDecimal value = parser.getBigDecimal(getKey());
            if (value == null)
            {
                setTestValue(getEmptyValue());
            }
            else
            {
                setTestValue(new NumberKey(value));
            }
        }
    }
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.turbine.om.NumberKey

        {
            String[] ss = pp.getStrings(getKey());
            NumberKey[] ival = new NumberKey[ss.length];
            for (int i=0; i<ss.length; i++)
            {
                ival[i] = new NumberKey(ss[i]);
            }
            setTestValue(ival);
        }
        else
        {
            setTestValue( new NumberKey(pp.getString(getKey())) );
        }
    }
View Full Code Here

Examples of org.apache.turbine.om.NumberKey

                                   -1,
                                   -1,
                                   -1,
                                   -1,
                                   null);
        je.setPrimaryKey((ObjectKey) new NumberKey(oid));
        return scheduleQueue.getJob(je);
    }
View Full Code Here

Examples of org.apache.turbine.om.NumberKey

            Object object = parameters.get(convert(name));
            if (object != null)
            {
                value = ((String[])object)[0];
            }               
            return new NumberKey(value);
        }
        catch ( ClassCastException e )
        {
            return null;
        }
View Full Code Here

Examples of org.apache.turbine.om.NumberKey

           
            if (keyGen.isPriorToInsert())
            {
                if ( pk.getType() instanceof Number )
                {
                    id = new NumberKey( tableMap.getIdGenerator()
                        .getIdAsBigDecimal(dbCon.getConnection(), keyInfo) );
                }
                else
                {
                    id = new StringKey( tableMap.getIdGenerator()
                        .getIdAsString(dbCon.getConnection(), keyInfo) );
                }
                criteria.add( pk.getFullyQualifiedName(), id );
            }
        }

        // Set up Village for the insert.
        TableDataSet tds = null;
        try
        {
            tds = new TableDataSet(dbCon.getConnection(), tableName );
            Record rec = tds.addRecord();
            insertOrUpdateRecord(rec, tableName, criteria);
        }
        finally
        {
            if (tds != null) tds.close();
        }

        // If the primary key column is auto-incremented, get the id
        // now.
        if ((keyGen != null) && (keyGen.isPostInsert()))
        {
            if ( pk.getType() instanceof Number )
            {
                id = new NumberKey( tableMap.getIdGenerator()
                    .getIdAsBigDecimal(dbCon.getConnection(), keyInfo) );
            }
            else
            {
                id = new StringKey( tableMap.getIdGenerator()
View Full Code Here

Examples of org.apache.turbine.om.NumberKey

            if (columnNames[i].equals(OBJECT_DATA_COLUMN))
                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 = (byte[])row.getValue(objectDataPosition).asBytes();
View Full Code Here

Examples of org.apache.turbine.om.NumberKey

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

        constraint = (Constraint)paramMap.get("maxValue");
        if ( constraint != null )
        {
            String param = constraint.getValue();
            maxValue = new NumberKey(param);
            maxValueMessage = constraint.getMessage();
        }
    }
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.