Package com.avaje.ebean.annotation

Examples of com.avaje.ebean.annotation.EnumMapping


   * </p>
   */
  public ScalarType<?> createEnumScalarType(Class<?> enumType) {

    // get the mapping information from EnumMapping
    EnumMapping enumMapping = (EnumMapping) enumType.getAnnotation(EnumMapping.class);
    if (enumMapping == null) {
      // look for EnumValue annotations instead
      return createEnumScalarType2(enumType);
    }

    String nameValuePairs = enumMapping.nameValuePairs();
    boolean integerType = enumMapping.integerType();
    int dbColumnLength = enumMapping.length();

    Map<String, String> nameValueMap = StringHelper.delimitedToMap(nameValuePairs, ",", "=");

    return createEnumScalarType(enumType, nameValueMap, integerType, dbColumnLength);
  }
View Full Code Here

TOP

Related Classes of com.avaje.ebean.annotation.EnumMapping

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.