/*
* Copyright (C) 2011-2014 GeoForge Project
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.geoforge.basprjdat.table.object;
import org.geoforge.sql.constraint.CstForeignKey;
import org.geoforge.sql.field.sql92.FldSql92VaryingCharacter;
/**
*
* @author Amadeus.Sowerby
*
* email: Amadeus.Sowerby_AT_gmail.com
* ... please remove "_AT_" from the above string to get the right email address
*
* meaning "name" is unique in between owner's sons
*/
abstract public class GfrBasTblDatChildAbs extends GfrBasTblDatXloAbs
{
//--
//--beg static
final public static FldSql92VaryingCharacter FLD_VAR_CHAR_ID_OBJ_OWNER =
new FldSql92VaryingCharacter("id_owner",
80,
false,
true);
//--
final public static FldSql92VaryingCharacter FLD_VAR_CHAR_NAME =
new FldSql92VaryingCharacter("name",
40,
false,
true);
//--end static
//--
//
private CstForeignKey _cstForeignKey_ = null;
//--
//--beg protected
protected GfrBasTblDatChildAbs(String str, GfrBasTblDatXloAbs tbl)
{
super("child_" + str);
this._cstForeignKey_ = new CstForeignKey("ForeignParentRef");
//--
super.add(GfrBasTblDatChildAbs.FLD_VAR_CHAR_ID_OBJ_OWNER);
super.add(GfrBasTblDatChildAbs.FLD_VAR_CHAR_NAME);
//-- Keys
this._cstForeignKey_.setField(GfrBasTblDatChildAbs.FLD_VAR_CHAR_ID_OBJ_OWNER);
this._cstForeignKey_.addReference(
GfrBasTblDatObjAbs.FLD_VAR_CHAR_ID_OBJ,
tbl);
super.add(_cstForeignKey_);
}
//--end protected
//--
}