|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.as400.ui.framework.java.DataFormatter
com.ibm.as400.ui.util.AS400Formatter
com.ibm.as400.ui.util.AS400SnameFormatter
public class AS400SnameFormatter extends AS400Formatter
Checks validity of a string as an AS/400 *SNAME.
Checks using the CCSID of the AS/400 specified in the constructor.
If parsing is unsuccessful, an IllegalUserDataException is thrown.
An AS/400 *SNAME is also known as a Simple Name.
A valid Simple Name is:
*SNAME is the same as *NAME except quoted values and '.' are not allowed.
The maximum length defaults to 256, but can be changed using setMaxLength.
To check names to IBM object standard length, use setMaxLength(AS400Formatter.IBM_OBJECT_NAME_MAX_LENGTH))
IllegalUserDataException,
AS400NameFormatter,
AS400SnameFormatter,
AS400CnameFormatter,
AS400CharFormatter,
AS400SQLNameFormatter| Modifier and Type | Field and Description |
|---|
| Fields inherited from class com.ibm.as400.ui.util.AS400Formatter |
|---|
ALLOW_EMBEDDED_WILD_CARDS, ALLOW_TRAILING_WILD_CARD, IBM_OBJECT_NAME_MAX_LENGTH, NO_WILD_CARDS, STANDARD_OBJECT_NAME_MAX_LENGTH |
| Constructor and Description |
|---|
AS400SnameFormatter(AS400 system)
Constructs an AS400SnameFormatter. |
| Modifier and Type | Method and Description |
|---|---|
int |
getMaxLength()
Gets the current number of characters allowed during checking. |
Object |
parse(String source)
Parses and checks a string as a valid AS/400 *SNAME. |
void |
setMaxLength(int length)
Sets the maximum number of characters allowed during checking. |
| Methods inherited from class com.ibm.as400.ui.util.AS400Formatter |
|---|
getCCSID, getWildCardMode, isAllowedWildCard, isValidEbcdicAlpha, setCCSID, setWildCardMode |
| Methods inherited from class com.ibm.as400.ui.framework.java.DataFormatter |
|---|
format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AS400SnameFormatter(AS400 system)
AS400SnameFormatter.
The CCSID of the input AS400 object will be used for checking.
If a null AS400 object is used, 37 is used as a default CCSID.
system - an AS400 object.| Method Detail |
|---|
public Object parse(String source)
throws IllegalUserDataException
*SNAME.
If the string is not valid an IllegalUserDataException is thrown.
parse in class DataFormattersource - the string to be parsedIllegalUserDataException
public void setMaxLength(int length)
throws IllegalArgumentException
IBM_OBJECT_NAME_MAX_LENGTH constant.
length - the maximum number of characters allowedIllegalArgumentExceptionAS400Formatter.IBM_OBJECT_NAME_MAX_LENGTH,
AS400Formatter.STANDARD_OBJECT_NAME_MAX_LENGTHpublic int getMaxLength()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||