com.frameworkset.platform.ldap.LdapDatatrans Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pdp-system Show documentation
Show all versions of pdp-system Show documentation
bboss public development platform base on bboss.
package com.frameworkset.platform.ldap;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import javax.naming.NamingEnumeration;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
import javax.naming.directory.BasicAttribute;
import javax.naming.directory.BasicAttributes;
import javax.naming.directory.DirContext;
import javax.naming.directory.ModificationItem;
public class LdapDatatrans implements java.io.Serializable {
//ldap里面的所有属性和对象里面的所有属性必须是小写的
public BasicAttributes BeanToAttrs(Object object) throws Exception{
BasicAttributes attrs = new BasicAttributes(); //条目的属性列表
Method[] ms = object.getClass().getMethods();
for(int j = 0; j