Package com.avaje.ebean.config.dbplatform

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


     */
    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

  
  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

TOP

Related Classes of com.avaje.ebean.config.dbplatform.IdType

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.