Package org.g4studio.core.id.generator

Examples of org.g4studio.core.id.generator.DefaultIDGenerator


   */
  public DefaultIDGenerator getDefaultIDGenerator(){
    Dto dto = new BaseDto();
    dto.put("fieldname", getFieldname());
    dto = (BaseDto)g4Dao.queryForObject("IdGenerator.getEaSequenceByFieldName", dto);
    DefaultIDGenerator idGenerator = new DefaultIDGenerator();
    DefaultSequenceFormater sequenceFormater = new DefaultSequenceFormater();
    sequenceFormater.setPattern(dto.getAsString("pattern"));
    DefaultSequenceGenerator sequenceGenerator = new DefaultSequenceGenerator(getFieldname());
    SequenceStorer sequenceStorer = new DBSequenceStorer();
    sequenceGenerator.setSequenceStorer(sequenceStorer);
    sequenceGenerator.setCache(catche);
    idGenerator.setSequenceFormater(sequenceFormater);
    idGenerator.setSequenceGenerator(sequenceGenerator);
    return idGenerator;
  }
View Full Code Here


    // DefaultSequenceFormater();
    // sequenceFormater.setPattern("0000000");
    // generator.setSequenceFormater(sequenceFormater);
    // System.out.println(generator.create());

    DefaultIDGenerator generator = new DefaultIDGenerator();
    DefaultSequenceGenerator sequenceGenerator = TimeRollingSequenceGenerator
        .getDayRollingSequenceGenerator();
    sequenceGenerator.setMinValue(1000000);
    sequenceGenerator.setMaxValue(9999999);
    generator.setSequenceGenerator(sequenceGenerator);
    System.out.println(generator.create());
    logger.debug("dddddddddddd");

    // net.jcreate.e3.commons.id.sequence.DefaultSequenceGenerator
    // sequenceGenerator =
    // new net.jcreate.e3.commons.id.sequence.DefaultSequenceGenerator();
View Full Code Here

TOP

Related Classes of org.g4studio.core.id.generator.DefaultIDGenerator

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.