Examples of FieldType


Examples of com.j256.ormlite.field.FieldType

  private static <T> FieldType[] extractFieldTypes(ConnectionSource connectionSource, Class<T> clazz, String tableName)
      throws SQLException {
    List<FieldType> fieldTypes = new ArrayList<FieldType>();
    for (Class<?> classWalk = clazz; classWalk != null; classWalk = classWalk.getSuperclass()) {
      for (Field field : classWalk.getDeclaredFields()) {
        FieldType fieldType = FieldType.createFieldType(connectionSource, tableName, field, clazz);
        if (fieldType != null) {
          fieldTypes.add(fieldType);
        }
      }
    }
View Full Code Here

Examples of com.j256.ormlite.field.FieldType

      if (first) {
        first = false;
      } else {
        sb.append(',');
      }
      FieldType fieldType = tableInfo.getFieldTypeByColumnName(columnName);
      appendFieldColumnName(sb, fieldType, fieldTypeList);
      if (fieldType == idField) {
        hasId = true;
      }
    }
View Full Code Here

Examples of com.j256.ormlite.field.FieldType

  private FieldType[] convertFieldConfigs(ConnectionSource connectionSource, String tableName,
      List<DatabaseFieldConfig> fieldConfigs) throws SQLException {
    List<FieldType> fieldTypes = new ArrayList<FieldType>();
    for (DatabaseFieldConfig fieldConfig : fieldConfigs) {
      FieldType fieldType = null;
      // walk up the classes until we find the field
      for (Class<?> classWalk = dataClass; classWalk != null; classWalk = classWalk.getSuperclass()) {
        Field field;
        try {
          field = classWalk.getDeclaredField(fieldConfig.getFieldName());
        } catch (NoSuchFieldException e) {
          // we ignore this and just loop hopefully finding it in a upper class
          continue;
        }
        if (field != null) {
          fieldType = new FieldType(connectionSource, tableName, field, fieldConfig, dataClass);
          break;
        }
      }

      if (fieldType == null) {
View Full Code Here

Examples of com.j256.ormlite.field.FieldType

    if (value == null) {
      return null;
    } else if (fieldType == null) {
      return value;
    } else if (fieldType.isForeign() && fieldType.getFieldType() == value.getClass()) {
      FieldType idFieldType = fieldType.getForeignIdField();
      return idFieldType.extractJavaFieldValue(value);
    } else {
      return fieldType.convertJavaFieldToSqlArgValue(value);
    }
  }
View Full Code Here

Examples of com.j256.ormlite.field.FieldType

    return true;
  }

  public ID extractId(T data) throws SQLException {
    checkForInitialized();
    FieldType idField = tableInfo.getIdField();
    @SuppressWarnings("unchecked")
    ID id = (ID) idField.extractJavaFieldValue(data);
    return id;
  }
View Full Code Here

Examples of com.j256.ormlite.field.FieldType

    } else if (fieldType.isForeign() && fieldType.getFieldType() == argOrValue.getClass()) {
      /*
       * If we have a foreign field and our argument is an instance of the foreign object (i.e. not its id), then
       * we need to extract the id.
       */
      FieldType idFieldType = fieldType.getForeignIdField();
      appendArgOrValue(databaseType, idFieldType, sb, argList, idFieldType.extractJavaFieldValue(argOrValue));
      // no need for the space since it was done in the recursion
      appendSpace = false;
    } else if (fieldType.isEscapedValue()) {
      databaseType.appendEscapedWord(sb, fieldType.convertJavaFieldToSqlArgValue(argOrValue).toString());
    } else {
View Full Code Here

Examples of com.log4jviewer.filters.FilterItemModel.FieldType

            } else if (FilterXmlConstants.LOGIC_OPERAND.equals(qName)) {
                LogicOperand logicOp = validateAndGetLogicOperand(value);
                filterItemModel.setLogicOperand(logicOp);

            } else if (FilterXmlConstants.FIELD_TYPE.equals(qName)) {
                FieldType fieldType = validateAndGetFieldType(value);
                filterItemModel.setFieldType(fieldType);

            } else if (FilterXmlConstants.INCLUDE.equals(qName)) {
                filterItemModel.setInclude(Boolean.parseBoolean(value));
View Full Code Here

Examples of com.netflix.zeno.fastblob.record.schema.FastBlobSchema.FieldType

        long currentPosition = objectBeginOffset;

        for(int i=0;i<fieldPointers.length;i++) {
            fieldPointers[i] = currentPosition;

            FieldType type = getSchema().getFieldType(i);

            currentPosition += fieldLength(currentPosition, type);
        }

        return (int)(currentPosition - objectBeginOffset);
View Full Code Here

Examples of com.sforce.soap.partner.FieldType

  private void addColumns(DescribeSObjectResult objectMetadata, Table table) throws TranslatorException {
    List<Field> fields = objectMetadata.getFields();
    for (Field field : fields) {
      String normalizedName = NameUtil.normalizeName(field.getName());
      FieldType fieldType = field.getType();
      if(!this.connectorEnv.isModelAuditFields() && isAuditField(field.getName())) {
        continue;
      }
      String sfTypeName = fieldType.value();
      Column column = null;
      if(sfTypeName.equals(FieldType.STRING) || //string
          sfTypeName.equals(FieldType.COMBOBOX) || //"combobox"
          sfTypeName.equals(FieldType.REFERENCE) || //"reference"
          sfTypeName.equals(FieldType.PHONE) || //"phone"
View Full Code Here

Examples of com.volantis.mcs.protocols.forms.FieldType

     * Test the getting of the field type. This is simple test to ensure the
     * result returned is never null and the type is TextInputFieldType.
     */
    public void testGetFieldType() throws Exception {
        PAPIElement element = createTestablePAPIElement();
        FieldType type = null;
        XFTextInputElementImpl xfElement = (XFTextInputElementImpl)element;
        type = xfElement.getFieldType(null);
        assertNotNull(type);
        assertTrue(type instanceof TextInputFieldType);
    }
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.