Examples of UUIDHexGenerator


Examples of org.datanucleus.store.valuegenerator.UUIDHexGenerator

     * Test for the length of the generated "uuid-hex" string.
     * Should be 32 characters as per the JDO2 spec.
     */
    public void testStringLength()
    {
        UUIDHexGenerator gen = new UUIDHexGenerator("Test", null);
        for (int i=0; i<10; i++)
        {
            Object id = gen.next();
            assertEquals(32, id.toString().length());
        }
    }
View Full Code Here

Examples of org.datanucleus.store.valuegenerator.UUIDHexGenerator

     */
    public void testEquality()
    {
        // Create 1000 identifiers
        String[] ids = new String[1000];
        UUIDHexGenerator gen = new UUIDHexGenerator("Test", null);
        for (int i=0;i<ids.length;i++)
        {
            ids[i] = (String)gen.next();
        }

        // Check for equality of any of them
        for (int i=0;i<ids.length;i++)
        {
View Full Code Here

Examples of org.datanucleus.store.valuegenerator.UUIDHexGenerator

     * Test for the length of the generated "uuid-hex" string.
     * Should be 32 characters as per the JDO2 spec.
     */
    public void testStringLength()
    {
        UUIDHexGenerator gen = new UUIDHexGenerator("Test", null);
        for (int i=0; i<10; i++)
        {
            Object id = gen.next();
            assertEquals(32, id.toString().length());
        }
    }
View Full Code Here

Examples of org.datanucleus.store.valuegenerator.UUIDHexGenerator

     */
    public void testEquality()
    {
        // Create 1000 identifiers
        String[] ids = new String[1000];
        UUIDHexGenerator gen = new UUIDHexGenerator("Test", null);
        for (int i=0;i<ids.length;i++)
        {
            ids[i] = (String)gen.next();
        }

        // Check for equality of any of them
        for (int i=0;i<ids.length;i++)
        {
View Full Code Here

Examples of org.hibernate.id.UUIDHexGenerator

        if (key != null) {
            newStructEntry.setKey(String.valueOf(key));
        }
        else {
            UUIDHexGenerator idGenerator = new UUIDHexGenerator();
            newStructEntry.setKey(String.valueOf(idGenerator.generate((SessionImplementor) getSession(), newStructEntry)));
        }

        if (reference instanceof WGArea) {
            Area area = (Area) ((WGDocumentImpl) reference.getCore()).getEntity();
            newStructEntry.setArea(area);
View Full Code Here

Examples of org.hibernate.id.UUIDHexGenerator

        if (name != null) {
            newProfile.setName(name);
        }
        else {
            UUIDHexGenerator idGenerator = new UUIDHexGenerator();
            newProfile.setName(String.valueOf(idGenerator.generate((SessionImplementor) getSession(), newProfile)));
        }
        newProfile.setType(new Integer(type));
        newProfile.setHits(new Integer(0));
        newProfile.setSessions(new Integer(0));
        newProfile.setLanguages(new ArrayList<String>());
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.