entry = new directoryentry(LDAP+DL path,username,pwd,authenticationtype.secure)
i gave all the filters and properties to load conditions and finally
child = results[0].getdirectoryentry()
i can access all the properties of the DL with child
if(!child.properties["member"].contains("CN=username,ou=something,ou=something,dc=something,dc=com"))
child.properties["member"].add("CN=username,ou=something,ou=something,dc=something,dc=com")
try{
child.commitchanges();