Package org.apache.torque.om

Examples of org.apache.torque.om.StringKey


        BitType bitType = BitTypePeer.doSelectSingleRecord(
                new Criteria().where(BitTypePeer.ID, "t1"));
        assertTrue("BIT should be true but is: "
                + bitType.getBitValue(), bitType.getBitValue());

        bitType = BitTypePeer.retrieveByPK(new StringKey("f1"));
        assertFalse("BIT should be false but is: "
                + bitType.getBitValue(), bitType.getBitValue());
    }
View Full Code Here


        if (prop == null)
        {
            return;
        }

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

        if (prop == null)
        {
            return;
        }

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

            String[] ss = parser.getStrings(getKey());
            StringKey[] ival = new StringKey[ss.length];
            for (int i = 0; i < ss.length; i++)
            {
                ival[i] = (StringUtils.isNotEmpty(ss[i]))
                        ? new StringKey(ss[i]) : (StringKey) getEmptyValue();
            }
            setTestValue(ival);
        }
        else
        {
            String val = parser.getString(getKey());
            setTestValue((StringUtils.isNotEmpty(val))
                    ? new StringKey(val) : (StringKey) getEmptyValue());
        }
    }
View Full Code Here

            attr = attribs.get(attrName);
            if (attr != null && attr.get() != null)
            {
                try
                {
                    setPrimaryKey(new StringKey(attr.get().toString()));
                }
                catch (Exception ex)
                {
                    log.error("Exception caught:", ex);
                }
View Full Code Here

     * @return A StringKey, or <code>null</code> if unparsable.
     * @deprecated no replacement
     */
    public StringKey getStringKey(String name)
    {
        StringKey result = null;
        try
        {
            String value = getString(name);
            if (StringUtils.isNotEmpty(value))
            {
                result = new StringKey(value);
            }
        }
        catch (ClassCastException e)
        {
            log.error("Parameter ("
View Full Code Here

                    id = new NumberKey(
                            keyGen.getIdAsBigDecimal(con, keyInfo));
                }
                else
                {
                    id = new StringKey(keyGen.getIdAsString(con, keyInfo));
                }
            }
        }
        catch (Exception e)
        {
View Full Code Here

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

     * Sets the default value for an StringKeyField
     */

    protected void setDefaultValue(String prop)
    {
        defaultValue = new StringKey(prop);
    }
View Full Code Here

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

TOP

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

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.