Examples of IdType


Examples of com.avaje.ebean.config.dbplatform.IdType

     * Notice: Actually, this test depends on H2 as used database as we are going to fetch the current value from the sequence
     */
    public void testSequence() throws SQLException
    {
      SpiEbeanServer server = (SpiEbeanServer)getServer();
      IdType idType = server.getDatabasePlatform().getDbIdentity().getIdType();
      String platformName = server.getDatabasePlatform().getName();
      if (!IdType.SEQUENCE.equals(idType)){
        // only run this test when SEQUENCE is being used
        return;
      }
View Full Code Here

Examples of com.avaje.ebean.config.dbplatform.IdType

     */
    public void testIdentity() throws SQLException
    {

      SpiEbeanServer server = (SpiEbeanServer)getServer();
      IdType idType = server.getDatabasePlatform().getDbIdentity().getIdType();
     
      if (!IdType.IDENTITY.equals(idType)){
        // only run this test when SEQUENCE is being used
        return;
      }
View Full Code Here

Examples of com.avaje.ebean.config.dbplatform.IdType

  
  protected boolean isIdentity(BeanProperty p) {

    if (p.isId()) {
      try {
        IdType idType = p.getBeanDescriptor().getIdType();

        if (idType.equals(IdType.IDENTITY)) {

          int jdbcType = p.getScalarType().getJdbcType();
          if (jdbcType == Types.INTEGER || jdbcType == Types.BIGINT || jdbcType == Types.SMALLINT) {

            return true;
View Full Code Here

Examples of com.bleujin.framework.valid.validator.IdType

  }

 
  public void testIdType() throws Exception {
    assertEquals(false, new IdType(b, SVALUE).isValid()) ;
   
    b.setSvalue("1dd") ;
    assertEquals(false, new IdType(b, SVALUE).isValid()) ;

    b.setSvalue("_dd") ;
    assertEquals(false, new IdType(b, SVALUE).isValid()) ;

    b.setSvalue("d") ;
    assertEquals(false, new IdType(b, SVALUE).isValid()) ;

    b.setSvalue("d1") ;
    assertEquals(false, new IdType(b, SVALUE).isValid()) ;

    b.setSvalue("d1d_") ;
    assertEquals(true, new IdType(b, SVALUE).isValid()) ;

  }
View Full Code Here

Examples of oasis.names.specification.ubl.schema.xsd.commonbasiccomponents_2.IDType

        System.err.println(it.getID().getValue());

        InvoiceType it2 = it;

        IDType id = new IDType();
        id.setValue("100");
        it2.setID(id);

        System.err.println(it2.getID().getValue());

        FileOutputStream fos = new FileOutputStream(new File(new File("E:/Temp/in"), id.getValue()));

        InvoiceTypeMarshaller.marshal(it2, fos);
    }
View Full Code Here

Examples of oasis.names.specification.ubl.schema.xsd.commonbasiccomponents_2.IDType

    }

    public String toString() {
        StringBuilder sb = new StringBuilder(super.toString());
        if (invoiceToBeRendered != null) {
            IDType invoiceID = invoiceToBeRendered.getID();
            sb.append(formatKeyValue("invoiceKeyToBeRendered", invoiceID.getValue()));
        }
        return sb.toString();
    }
View Full Code Here

Examples of oasis.names.specification.ubl.schema.xsd.commonbasiccomponents_2.IDType

            String issueDateString =
                    CalendarUtil.toLocalDate(invoiceType.getIssueDate().getValue()).toString("yyyy-MM-dd");
            if (issueDateString != null) {
                sb.append(issueDateString);
            }
            IDType invoiceID = invoiceType.getID();
            if (invoiceID != null) {
                if (!sb.toString().isEmpty()) { // it means that the issue date is already appended
                    sb.append("_");
                }
                sb.append(invoiceID.getValue());
            }
            InvoiceCreationInput input = (InvoiceCreationInput)getInput();
            sb.append(input.getInvoiceOutputFormat().getFileSuffix());
        }
        if (!sb.toString().isEmpty()) {
View Full Code Here

Examples of oasis.names.specification.ubl.schema.xsd.commonbasiccomponents_2.IDType

        StringBuilder sb = new StringBuilder();
        if (invoiceOutputURI != null) {
            sb.append(StringUtil.formatKeyValue("invoiceOutputURI", getInvoiceOutputURI().getPath()));
        }
        if (generatedInvoiceType != null) {
            IDType invoiceIDType = generatedInvoiceType.getID();
            if (invoiceIDType != null) {
                sb.append(StringUtil.formatKeyValue("generatedInvoiceKey",invoiceIDType.getValue()));
            }

        }
        return sb.toString();
    }
View Full Code Here

Examples of play.modules.morphia.MorphiaPlugin.IdType

public class IdGenerator {
    public static Datastore ds() {
        return MorphiaPlugin.ds();
    }
    public static Object generateId(Model entity){
        IdType t = MorphiaPlugin.getIdType();
        switch (t) {
        case Long:
            return generateLongId(entity);
        case ObjectId:
            return generateObjectIdId(entity);
View Full Code Here

Examples of play.modules.morphia.MorphiaPlugin.IdType

    public static <T extends Model> ObjectId generateObjectIdId(Class<T> clazz) {
        return new ObjectId();
    }
   
    public static String getIdTypeName() {
        IdType t = MorphiaPlugin.getIdType();
        switch (t) {
        case Long:
            return Long.class.getName();
        case ObjectId:
            return ObjectId.class.getName();
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.