diff options
author | Ade Lee <alee@redhat.com> | 2011-12-07 16:58:12 -0500 |
---|---|---|
committer | Ade Lee <alee@redhat.com> | 2011-12-07 16:58:12 -0500 |
commit | 32150d3ee32f8ac27118af7c792794b538c78a2f (patch) | |
tree | 52dd96f664a6fa51be25b28b6f10adc5f2c9f660 /pki/base/common/src/com/netscape/cmscore/dbs/BigIntegerMapper.java | |
parent | f05d58a46795553beb8881039cc922974b40db34 (diff) | |
download | pki-32150d3ee32f8ac27118af7c792794b538c78a2f.tar.gz pki-32150d3ee32f8ac27118af7c792794b538c78a2f.tar.xz pki-32150d3ee32f8ac27118af7c792794b538c78a2f.zip |
Formatting
Formatted project according to eclipse project settings
Diffstat (limited to 'pki/base/common/src/com/netscape/cmscore/dbs/BigIntegerMapper.java')
-rw-r--r-- | pki/base/common/src/com/netscape/cmscore/dbs/BigIntegerMapper.java | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/BigIntegerMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/BigIntegerMapper.java index 8d6c325f..838306f0 100644 --- a/pki/base/common/src/com/netscape/cmscore/dbs/BigIntegerMapper.java +++ b/pki/base/common/src/com/netscape/cmscore/dbs/BigIntegerMapper.java @@ -17,7 +17,6 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.cmscore.dbs; - import java.math.BigInteger; import java.util.Enumeration; import java.util.Vector; @@ -29,14 +28,12 @@ import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.dbs.IDBAttrMapper; import com.netscape.certsrv.dbs.IDBObj; - /** - * A class represents ann attribute mapper that maps - * a Java BigInteger object into LDAP attribute, - * and vice versa. - * + * A class represents ann attribute mapper that maps a Java BigInteger object + * into LDAP attribute, and vice versa. + * * @author thomask - * @version $Revision$, $Date$ + * @version $Revision$, $Date$ */ public class BigIntegerMapper implements IDBAttrMapper { @@ -61,38 +58,34 @@ public class BigIntegerMapper implements IDBAttrMapper { /** * Maps object into ldap attribute set. */ - public void mapObjectToLDAPAttributeSet(IDBObj parent, - String name, Object obj, LDAPAttributeSet attrs) - throws EBaseException { - attrs.add(new LDAPAttribute(mLdapName, - BigIntegerToDB((BigInteger) obj))); + public void mapObjectToLDAPAttributeSet(IDBObj parent, String name, + Object obj, LDAPAttributeSet attrs) throws EBaseException { + attrs.add(new LDAPAttribute(mLdapName, BigIntegerToDB((BigInteger) obj))); } /** - * Maps LDAP attributes into object, and put the object - * into 'parent'. + * Maps LDAP attributes into object, and put the object into 'parent'. */ - public void mapLDAPAttributeSetToObject(LDAPAttributeSet attrs, - String name, IDBObj parent) throws EBaseException { + public void mapLDAPAttributeSetToObject(LDAPAttributeSet attrs, + String name, IDBObj parent) throws EBaseException { LDAPAttribute attr = attrs.getAttribute(mLdapName); if (attr == null) return; - parent.set(name, BigIntegerFromDB( - (String) attr.getStringValues().nextElement())); + parent.set(name, BigIntegerFromDB((String) attr.getStringValues() + .nextElement())); } /** * Maps search filters into LDAP search filter. */ - public String mapSearchFilter(String name, String op, - String value) throws EBaseException { + public String mapSearchFilter(String name, String op, String value) + throws EBaseException { String v = null; try { if (value.startsWith("0x") || value.startsWith("0X")) { - v = BigIntegerToDB(new - BigInteger(value.substring(2), 16)); + v = BigIntegerToDB(new BigInteger(value.substring(2), 16)); } else { v = BigIntegerToDB(new BigInteger(value)); } |