public class DbObject<ParentType extends DbObject<?>> extends Object
Modifier | Constructor and Description |
---|---|
protected |
DbObject(ParentType parent,
String name) |
Modifier and Type | Method and Description |
---|---|
protected static <T extends DbObject<?>> |
addObjects(Collection<T> objs,
DbObject<?> parent,
T... objArr)
Adds the given objects to the given collection after verifying that they
are owned by the given parent.
|
protected <T extends DbObject<?>> |
checkOwnership(T... objs) |
protected <T extends DbObject<?>> |
checkOwnership(T obj) |
protected static <T extends DbObject<?>> |
findObject(Collection<T> objects,
String name) |
String |
getAbsoluteName() |
String |
getName() |
protected ParentType |
getParent() |
DbSpec |
getSpec()
Default implementation returns the parent's spec.
|
String |
toString() |
protected DbObject(ParentType parent, String name)
public DbSpec getSpec()
protected ParentType getParent()
public String getName()
public String getAbsoluteName()
null
names
of parent objects, separated by '.' characters.protected <T extends DbObject<?>> T checkOwnership(T obj)
IllegalArgumentException
- if the parent of the given object is not
this objectprotected <T extends DbObject<?>> T[] checkOwnership(T... objs)
IllegalArgumentException
- if the parent of the given object is not
this objectprotected static <T extends DbObject<?>> T findObject(Collection<T> objects, String name)
objects
- collection to searchname
- name of the object to findnull
otherwise.protected static <T extends DbObject<?>> void addObjects(Collection<T> objs, DbObject<?> parent, T... objArr)
objs
- the collection to add the objectsparent
- the expected owner of the objectsobjArr
- the objects to be added, may be null
Copyright © 2006–2021 OpenHMS. All rights reserved.