|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.sqlpower.wabit.AbstractWabitObject
ca.sqlpower.wabit.WabitDataSource
public class WabitDataSource
An implementation of WabitObject that wraps a data sources.
This data source can be any implementation of SPDataSource.
| Constructor Summary | |
|---|---|
WabitDataSource(ca.sqlpower.sql.SPDataSource ds)
Creates a WabitDataSource wrapper for the given data source. |
|
| Method Summary | |
|---|---|
boolean |
allowsChildren()
Returns true if this object may contain children. |
int |
childPositionOffset(java.lang.Class<? extends WabitObject> childType)
Returns the position in the list that would be returned by getChildren() that the first object of type childClass is, or where it would be if there were any children of that type. |
CleanupExceptions |
cleanup()
Default cleanup method that does nothing. |
boolean |
equals(java.lang.Object obj)
|
java.util.List<WabitObject> |
getChildren()
Returns an unmodifiable list of the children in this WabitObject. |
java.util.List<WabitObject> |
getDependencies()
Returns a list of all WabitObjects that this Wabit object is
dependent on. |
ca.sqlpower.sql.SPDataSource |
getSPDataSource()
|
java.lang.String |
getUUID()
Gets the UUID associated with this instance's data source. |
int |
hashCode()
|
protected boolean |
removeChildImpl(WabitObject child)
This is the object specific implementation of removeChild. |
void |
removeDependency(WabitObject dependency)
Removes the given object as a dependency of this object. |
void |
setUUID(java.lang.String uuid)
Sets the UUID associated with this instance's data source. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public WabitDataSource(@Nonnull
ca.sqlpower.sql.SPDataSource ds)
It is vitally important to call cleanup() on a WabitDataSource
when you are done with it. If you attach the WabitDataSource to a
workspace, cleanup will be done automatically the session is closed, but
if the object you create does not get attached to a session, cleanup is
your own responsibility.
ds - The data source to wrap. Must not be null.| Method Detail |
|---|
public CleanupExceptions cleanup()
AbstractWabitObject
cleanup in interface WabitObjectcleanup in class AbstractWabitObjectpublic java.lang.String getUUID()
getUUID in interface WabitObjectgetUUID in class AbstractWabitObjectpublic void setUUID(java.lang.String uuid)
setUUID in interface WabitObjectsetUUID in class AbstractWabitObjectThe - UUID, a unique identifying string associated with this instance's
data source.public boolean allowsChildren()
WabitObject
WabitObject.childPositionOffset(Class)public int childPositionOffset(java.lang.Class<? extends WabitObject> childType)
WabitObject
public java.util.List<WabitObject> getChildren()
WabitObject
public ca.sqlpower.sql.SPDataSource getSPDataSource()
public boolean equals(java.lang.Object obj)
equals in class AbstractWabitObjectpublic int hashCode()
hashCode in class java.lang.Objectpublic void removeDependency(WabitObject dependency)
WabitObject
public java.util.List<WabitObject> getDependencies()
WabitObjectWabitObjects that this Wabit object is
dependent on. Children of a WabitObject are not dependencies and will not
be returned in this list. If there are no objects this Wabit object is
dependent on an empty list should be returned. These are only the
immediate dependencies of this object. If you want to find the
dependencies of this object's dependencies as well it may be useful to
look at WorkspaceGraphModel to make a full graph of all of the
dependencies.
protected boolean removeChildImpl(WabitObject child)
AbstractWabitObject
removeChildImpl in class AbstractWabitObjectAbstractWabitObject.removeChild(WabitObject)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||