com.sap.ip.me.api.smartsync
Class FieldInputQualifyType

java.lang.Object
  extended bycom.sap.ip.me.api.smartsync.FieldInputQualifyType

public final class FieldInputQualifyType
extends java.lang.Object

An enumeration of qualification (permission) types for possible field input. This can either be:

  • DEFAULT - the input is optional.
  • MANDATORY - the field must be set with a proper value.
  • FORBIDDEN - any field update is forbidden.

    The type of field is defined in the metadata xml.

      <Field name="OrderNo" type="N" description="sales order no." length="10" decimalLength="0" signed="false" isKey="false" isIndex="true" isMultiLangText="false">
             <Input type="create">true</Input>
      </Field>
      
    For the OrderNo field the Input element attribute type has the value "create" and the Input element value is true. This means that the value has to be set to this field. So OrderNo is a MANDATORY type of field.
      <Field name="SyncKey" type="N" description="sync key" length="10" decimalLength="0" signed="false" isKey="true" isIndex="true" isMultiLangText="false">
             <Input type="modify">false</Input>
      </Field>
       
    For the SyncKey field the Input element attribute type has the value "modify" and the Input element value is false. This means that a value should not be set to this field. So SyncKey is a FORBIDDEN type of field.
      <Field name="EstmPrice" type="P" description="estimation of the total price" length="15" decimalLength="2" signed="false" isKey="false" isIndex="false" isMultiLangText="false">
      </Field>
      
    There is no input type specified in this field so this is a DEFAULT type of field. The FieldInputQualifyType can be retrieved from the FieldDescriptor
      FieldInputQualifyType inputType = fieldDesc.getCreateInputQualifyType();
      if(inputType.toInt()==FieldInputQualifyType.MANDATORY.toInt()){
       ..............
       ..............
    
      }

    Since:
    2.1
    Author:
    SAP

    Field Summary
    static FieldInputQualifyType DEFAULT
              The field may be set; optional input.
    static FieldInputQualifyType FORBIDDEN
              The field must not be set;, forbidden input.
    static FieldInputQualifyType MANDATORY
              The field must be set; mandatory input.
     
    Method Summary
    static FieldInputQualifyType forInt(int typeAsint)
              Returns the FieldInputQualifyType instance for the specified integer.
     int toInt()
              Returns the number representation of this FieldInputQualifyType instance.
     java.lang.String toString()
               
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Field Detail

    DEFAULT

    public static FieldInputQualifyType DEFAULT
    The field may be set; optional input.


    MANDATORY

    public static FieldInputQualifyType MANDATORY
    The field must be set; mandatory input.


    FORBIDDEN

    public static FieldInputQualifyType FORBIDDEN
    The field must not be set;, forbidden input.

    Method Detail

    forInt

    public static FieldInputQualifyType forInt(int typeAsint)
    Returns the FieldInputQualifyType instance for the specified integer. Values other than specified below will return a null instance.
    • 0 - DEFAULT
    • 1 - MANDATORY
    • 2 - FORBIDDEN

    Parameters:
    typeAsint - the number representation of the FieldInputQualifyType
    Returns:
    the FieldInputQualifyType instance for the specified integer.

    toInt

    public int toInt()
    Returns the number representation of this FieldInputQualifyType instance.

    Returns:
    the number representation of this FieldInputQualifyType instance.

    toString

    public java.lang.String toString()


    Copyright © 2005 SAP AG. All Rights Reserved.