Package org.castor.ddlgen.schemaobject

Examples of org.castor.ddlgen.schemaobject.KeyGenerator


                Class cls = loader.loadClass(classname);
                KeyGeneratorFactory factory = (KeyGeneratorFactory) cls.newInstance();
                _factories.put(factory.getAlgorithmName(), factory);
               
                if (!factory.hasMandatoryParameters()) {
                    KeyGenerator generator = factory.createKeyGenerator();
                    _generators.put(generator.getAlias(), generator);
                }
            } catch (Exception ex) {
                String msg = "Problem instantiating key generator factory: ";
                LOG.error(msg + classname, ex);
            }
View Full Code Here


        if (factory == null) {
            LOG.warn("Unknown KeyGeneratorFactory: " + algorithm);
            throw new GeneratorException("Unknown KeyGeneratorFactory: " + algorithm);
        }
       
        KeyGenerator generator = factory.createKeyGenerator(definition);
        generator.setConfiguration(_config);
        _generators.put(generator.getAlias(), generator);
        return generator;
    }
View Full Code Here

    public KeyGenerator getKeyGenerator(final String alias)
        throws GeneratorException {
        if (alias == null) {
            throw new GeneratorException("No keygenerator alias specified");
        }
        KeyGenerator generator = (KeyGenerator) _generators.get(alias);
        if (generator == null) {
            LOG.warn("Unknown KeyGenerator: " + alias);
            throw new GeneratorException("Unknown KeyGenerator: " + alias);
        }
        return generator;
View Full Code Here

        boolean isUseFieldIdentity = _mappingHelper.isUseFieldIdentity(cm);
        Enumeration ef = cm.getClassChoice().enumerateFieldMapping();

        // Process key generator.
        String keygenerator = cm.getKeyGenerator();
        KeyGenerator keyGen = null;
        if (keygenerator != null) {
            keyGen = _keyGenRegistry.getKeyGenerator(keygenerator.toUpperCase());
        }
        table.setKeyGenerator(keyGen);
View Full Code Here

        boolean isUseFieldIdentity = _mappingHelper.isUseFieldIdentity(extendCm);
        Enumeration extendEf = extendCm.getClassChoice().enumerateFieldMapping();

        // Process key generator.
        String keygenerator = extendCm.getKeyGenerator();
        KeyGenerator keyGen = null;
        if (keygenerator != null) {
            keyGen = _keyGenRegistry.getKeyGenerator(keygenerator.toUpperCase());
        }
        table.setKeyGenerator(keyGen);
View Full Code Here

TOP

Related Classes of org.castor.ddlgen.schemaobject.KeyGenerator

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.