|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.text.Format
java.text.MessageFormat
org.mmbase.storage.util.Scheme
This is a specialised version of the MessageFormat class, with some awareness of MMBase objects. You can pass MMBase objects to Scheme when formatting a pattern. The Scheme automatically resolves the object to a value it can use in the pattern. Schemes are used by the storage to create configurable storage instructions (specifically database SQL code).
| Nested Class Summary |
| Nested classes inherited from class java.text.MessageFormat |
java.text.MessageFormat.Field |
| Constructor Summary | |
Scheme(StorageManagerFactory factory,
java.lang.String pattern)
Instantiate the Scheme |
|
| Method Summary | |
java.lang.String |
format(java.lang.Object[] params)
Applies the parameters to the scheme's pattern. |
protected java.lang.Object |
resolveParameter(java.lang.Object param)
Resolves an object (passed as a parameter) to a value that can be applied in a pattern. |
java.lang.String |
toString()
|
| Methods inherited from class java.text.MessageFormat |
applyPattern, clone, equals, format, format, format, formatToCharacterIterator, getFormats, getFormatsByArgumentIndex, getLocale, hashCode, parse, parse, parseObject, setFormat, setFormatByArgumentIndex, setFormats, setFormatsByArgumentIndex, setLocale, toPattern |
| Methods inherited from class java.text.Format |
format, parseObject |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Scheme(StorageManagerFactory factory,
java.lang.String pattern)
factory - The factory this scheme belongs to.pattern - The pattern to use for the scheme| Method Detail |
protected java.lang.Object resolveParameter(java.lang.Object param)
throws StorageException
param - the object to resolve
StorageException - if the object cannot be resolved
public java.lang.String format(java.lang.Object[] params)
throws StorageException
params - an array of parameters to apply to the pattern
StorageException - if one of the passed parameters cannot be resolvedpublic java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||