
com.frameworkset.platform.ldap.LdapDatatrans Maven / Gradle / Ivy
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
© 2015 - 2025 Weber Informatics LLC | Privacy Policy