com.alachisoft.ncache.security.config.User Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nc-security Show documentation
Show all versions of nc-security Show documentation
Internal package of Alachisoft.
package com.alachisoft.ncache.security.config;
import Alachisoft.NCache.Common.Configuration.ConfigurationAttributeAnnotation;
import com.alachisoft.ncache.serialization.core.io.InternalCompactSerializable;
import com.alachisoft.ncache.serialization.standard.io.CompactReader;
import com.alachisoft.ncache.serialization.standard.io.CompactWriter;
import java.io.IOException;
public class User implements InternalCompactSerializable, Cloneable {
private String _id;
private String _dn;
public User() {
}
public User(String userId, String userDN) {
_id = userId;
_dn = userDN;
}
@ConfigurationAttributeAnnotation(value = "id", appendText = "")
public final String getId() {
return _id;
}
@ConfigurationAttributeAnnotation(value = "id", appendText = "")
public final void setId(String value) {
_id = value;
}
@ConfigurationAttributeAnnotation(value = "dn", appendText = "")
public final String getDN() {
return _dn;
}
@ConfigurationAttributeAnnotation(value = "dn", appendText = "")
public final void setDN(String value) {
_dn = value;
}
public final Object clone() {
User user = new User();
user.setId(getId());
user.setDN(getDN());
return user;
}
@Override
public void Deserialize(CompactReader reader) throws IOException, ClassNotFoundException {
Object tempVar = reader.ReadObject();
_id = (String) ((tempVar instanceof String) ? tempVar : null);
Object tempVar2 = reader.ReadObject();
_dn = (String) ((tempVar2 instanceof String) ? tempVar2 : null);
}
@Override
public void Serialize(CompactWriter writer) throws IOException {
writer.WriteObject(_id);
writer.WriteObject(_dn);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy