Class AttributeMapping

java.lang.Object
com.groiss.ldap.AttributeMapping

public class AttributeMapping extends Object
Maps LDAP attribute names to field names of java objects. Is part of a class mapping. Different kinds of mapping can be specified via the provided finals.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Reference type BY_BOOL designates a reference based on a boolean value (TRUE/FALSE)
    static final int
    Reference type BY_CLASS designates a reference based on the name of the Java objects class
    static final int
    Reference type BY_DN designates a reference based on the distinguished name (LDAP-DN) of the class mapping of the objects class
    static final int
    Reference type BY_ID designates a reference based on the value of the id field of the Java Object
    static final int
    Reference type BY_ID_CHAIN designates a reference based on a chain of id references
    static final int
    Reference type BY_OID designates a reference based on the value of field oid of the java object
    static final int
    Reference type BY_PWD designates a special treatment of the password field according to RFC 2307
    static final int
    Reference type BY_VALUE designates a reference based on the attributes value.
  • Constructor Summary

    Constructors
    Constructor
    Description
    AttributeMapping(ClassMapping cm, String attName, String fieldName)
    Constructs a new AttributeMapping and adds it to a Class Mapping
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the LDAP attribute name of this attribute mapping
    Returns the class mapping this attribute mapping belongs to
    Returns the Java field name of this attribute mapping
    int
    Returns the reference type of this mapping
    void
    setRefType(int refType)
    Sets the reference type of this mapping

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • BY_VALUE

      public static final int BY_VALUE
      Reference type BY_VALUE designates a reference based on the attributes value. This is the default reference type.
      See Also:
    • BY_ID

      public static final int BY_ID
      Reference type BY_ID designates a reference based on the value of the id field of the Java Object
      See Also:
    • BY_DN

      public static final int BY_DN
      Reference type BY_DN designates a reference based on the distinguished name (LDAP-DN) of the class mapping of the objects class
      See Also:
    • BY_BOOL

      public static final int BY_BOOL
      Reference type BY_BOOL designates a reference based on a boolean value (TRUE/FALSE)
      See Also:
    • BY_ID_CHAIN

      public static final int BY_ID_CHAIN
      Reference type BY_ID_CHAIN designates a reference based on a chain of id references
      See Also:
    • BY_OID

      public static final int BY_OID
      Reference type BY_OID designates a reference based on the value of field oid of the java object
      See Also:
    • BY_CLASS

      public static final int BY_CLASS
      Reference type BY_CLASS designates a reference based on the name of the Java objects class
      See Also:
    • BY_PWD

      public static final int BY_PWD
      Reference type BY_PWD designates a special treatment of the password field according to RFC 2307
      See Also:
  • Constructor Details

    • AttributeMapping

      public AttributeMapping(ClassMapping cm, String attName, String fieldName)
      Constructs a new AttributeMapping and adds it to a Class Mapping
      Parameters:
      cm - the class mapping to which the attribute mapping is added
      attName - the LDAP attribute name
      fieldName - the Java field name
  • Method Details

    • getCm

      public ClassMapping getCm()
      Returns the class mapping this attribute mapping belongs to
      Returns:
      the class mapping
    • getFieldName

      public String getFieldName()
      Returns the Java field name of this attribute mapping
      Returns:
      the Java field name
    • getAttName

      public String getAttName()
      Returns the LDAP attribute name of this attribute mapping
      Returns:
      the LDAP attribute name
    • setRefType

      public void setRefType(int refType)
      Sets the reference type of this mapping
      Parameters:
      refType -
    • getRefType

      public int getRefType()
      Returns the reference type of this mapping
      Returns:
      the reference type of this mapping