com.novell.nds.dirxml.driver.jdbc.util
Class JDBCDNParser

java.lang.Object
  extended bycom.novell.nds.dirxml.driver.jdbc.util.JDBCDNParser

public class JDBCDNParser
extends Object

A JDBC shim DN or association (e.g. IDU=1,table=USR,schema=IDM).


Constructor Summary
JDBCDNParser(String someDN)
          Instantiates a JDBC shim DN/association.
 
Method Summary
 String getErrorMessage()
          Returns a parse error message, if any.
 String getSchemaName()
          Returns the schema name value in this DN/association.
 String getSlashEscapedValue(String columnName)
          Returns the value of column columnName in this DN/association.
 String getTableName()
          Returns the table name value in this DN/association.
 String getValue(String columnName)
          Returns the value of column columnName in this DN/association.
 boolean parseError()
          Indicates whether an error occurred parsing this DN/association.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCDNParser

public JDBCDNParser(String someDN)
Instantiates a JDBC shim DN/association.

Parameters:
someDN - may be null; format should be "<column-name>=<value>[+<column-name>=<value>]*,table=<table-name>[,schema=<schema-name>]?"
(* indicates zero or more; ? indicates zero or one)
Method Detail

parseError

public boolean parseError()
Indicates whether an error occurred parsing this DN/association.

Returns:
true if there was a parse error; false otherwise

getErrorMessage

public String getErrorMessage()
Returns a parse error message, if any.

Returns:
a string with length > 0 if there was a parse error; empty string otherwise; never returns null

getSlashEscapedValue

public String getSlashEscapedValue(String columnName)
Returns the value of column columnName in this DN/association. Return value is properly escaped for inclusion in a slash-formatted DN (e.g. "Tree\OU\Object"). Escapes characters {''' | '\' | '=' | '+'}.

Parameters:
columnName - the column value to return
Returns:
a string with length > 0 if there is a value; empty string otherwise; never returns null
See Also:
getValue(String)

getValue

public String getValue(String columnName)
Returns the value of column columnName in this DN/association. For example, if this DN were IDU=1,table=USR,schema=IDM and columnName were "IDU", this method would return "1".

Parameters:
columnName - the column value to return
Returns:
a string with length > 0 if there is a value; empty string otherwise; never returns null

getTableName

public String getTableName()
Returns the table name value in this DN/association. For example, if this DN were IDU=1,table=USR,schema=IDM, this method would return "USR".

Returns:
a string with length > 0 if there is a value; empty string otherwise; never returns null

getSchemaName

public String getSchemaName()
Returns the schema name value in this DN/association. For example, if this DN were IDU=1,table=USR,schema=IDM, this method would return "IDM".

Returns:
a string with length > 0 if there is a value; empty string otherwise; never returns null