|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Implementing instances provide a uniform way of creating a copy of themselves in which physical database table names are replaced by aliases. Classes that implement this interface are called with a combination of c=obj.clone(); c.prefixTables(prefixer)
TablePrefixer
Method Summary | |
java.lang.Object |
clone()
Make a shallow copy of this . |
void |
prefixTables(TablePrefixer prefixer)
Changes the fields in a newly created clone that are to be modified when making aliasses. |
Method Detail |
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
this
.
General advice: Do not overwrite clone().
prefixTables() works best with shallow copy which Object implements.
Issues: I have not found a (preferred) static equivalent of clone().
Since Objects clone() method is protected, we cannot just declare
Cloneable
, if we want to call clone() from outside of that
class hierarchy. Instead it must be public and implemented in each
Prefixable class by a call to super.clone().
java.lang.CloneNotSupportedException
public void prefixTables(TablePrefixer prefixer)
prefixer
- does the actual prefixing of simple and complex types.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |