All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cdc.util.rdb.RdbCatalog Maven / Gradle / Ivy

package cdc.util.rdb;

/**
 * Catalog description.
 * 

* Its parent is a Database.
* Its name must be unique.
* Its content is: *

    *
  • Schemas *
* * @author Damien Carbonne * */ public final class RdbCatalog extends RdbElement { RdbCatalog(String name, RdbDatabase parent) { super(name, parent, false); } @Override public final RdbElementKind getKind() { return RdbElementKind.CATALOG; } @Override public RdbDatabase getParent() { return getParent(RdbDatabase.class); } public RdbDatabase getDatabase() { return getParent(); } public RdbSchema createSchema(String name) { return new RdbSchema(name, this); } public RdbSchema getOptionalSchema(String name) { return getFirstChild(RdbSchema.class, name); } public RdbSchema getSchema(String name) { return notNull(getOptionalSchema(name), "schema", name); } public RdbSchema getOrCreateSchema(String name) { RdbSchema result = getOptionalSchema(name); if (result == null) { result = createSchema(name); } return result; } public Iterable getSchemas() { return getChildren(RdbSchema.class); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy