Examples of entityNamed()


Examples of com.gammastream.validity.GSVModel.entityNamed()


    public WOComponent deleteRuleInList() {
        String entityName = this.selectedAttribute().entity().name();
        GSVModel model = session.model();
        GSVEntity entity = model.entityNamed(entityName);
        if(entity==null){
            entity = new GSVEntity(model, entityName);
            model.addEntity(entity);
        }
        GSVAttribute att = entity.attributeNamed(this.selectedAttribute().name());
View Full Code Here

Examples of com.gammastream.validity.GSVModel.entityNamed()

   
    public WOComponent deleteRule() {
        String entityName = this.selectedAttribute().entity().name();
        GSVModel model = session.model();
        GSVEntity entity = model.entityNamed(entityName);
        if(entity==null){
            entity = new GSVEntity(model, entityName);
            model.addEntity(entity);
        }
        GSVAttribute att = entity.attributeNamed(this.selectedAttribute().name());
View Full Code Here

Examples of com.gammastream.validity.GSVModel.entityNamed()

            return null;
        }
       
            String entityName = this.selectedAttribute().entity().name();
            GSVModel model = session.model();
            GSVEntity entity = model.entityNamed(entityName);
            if(entity==null){
                entity = new GSVEntity(model, entityName);
                model.addEntity(entity);
            }
            entity.setModel(model);
View Full Code Here

Examples of com.gammastream.validity.GSVModel.entityNamed()

    }
   
    public int ruleCount(){
        String entityName = this.currentAttribute.entity().name();
        GSVModel model = session.model();
        GSVEntity entity = model.entityNamed(entityName);
        if(entity==null){
            return 0;
        }
        GSVAttribute att = entity.attributeNamed(this.currentAttribute.name());
        if(att==null){
View Full Code Here

Examples of com.webobjects.eoaccess.EOModel.entityNamed()

    public void finishInitialization() {
        EOEditingContext ec = ERXEC.newEditingContext();
        ec.lock();
        try {
            EOModel model = EOModelGroup.defaultGroup().modelNamed("BugTracker");
            EOEntity release = model.entityNamed("Release");
            if(model.connectionDictionary().toString().toLowerCase().indexOf(":mysql") >= 0) {
                release.setExternalName("`RELEASE`");
            } else if(model.connectionDictionary().toString().toLowerCase().indexOf(":derby") >= 0) {
                // AK: if we set the connection string to ;create=true, then subsequent model create scripts will
                // delete former entries, so we set this once here.
View Full Code Here

Examples of com.webobjects.eoaccess.EOModel.entityNamed()

      try {
        EOModel dbUpdaterModel = dbUpdaterModelWithModel(model, adaptor);
        NSMutableDictionary<String, Object> row = new NSMutableDictionary<String, Object>();
        row.setObjectForKey(Integer.valueOf(1), "updateLock");
        row.setObjectForKey(lockOwnerName, "lockOwner");
        EOEntity dbUpdaterEntity = dbUpdaterModel.entityNamed(migrationTableName(adaptor));
        try {
          count = channel.updateValuesInRowsDescribedByQualifier(row, EOQualifier.qualifierWithQualifierFormat("modelName = '" + model.name() + "' and (updateLock = 0 or lockOwner = '" + lockOwnerName + "')", null), dbUpdaterEntity);
        }
        finally {
          channel.cancelFetch();
View Full Code Here

Examples of com.webobjects.eoaccess.EOModel.entityNamed()

    try {
      EOModel dbUpdaterModel = dbUpdaterModelWithModel(model, adaptor);
      NSMutableDictionary<String, Object> row = new NSMutableDictionary<String, Object>();
      row.setObjectForKey(Integer.valueOf(0), "updateLock");
      row.setObjectForKey(NSKeyValueCoding.NullValue, "lockOwner");
      EOEntity dbUpdaterEntity = dbUpdaterModel.entityNamed(migrationTableName(adaptor));
      channel.adaptorContext().commitTransaction();
      try {
        channel.updateValuesInRowsDescribedByQualifier(row, new EOKeyValueQualifier("modelName", EOQualifier.QualifierOperatorEqual, model.name()), dbUpdaterEntity);
      }
      finally {
View Full Code Here

Examples of com.webobjects.eoaccess.EOModel.entityNamed()

      wasOpen = false;
    }
    int version;
    try {
      EOModel dbUpdaterModel = dbUpdaterModelWithModel(model, adaptor);
      EOEntity dbUpdaterEntity = dbUpdaterModel.entityNamed(migrationTableName(adaptor));
      EOFetchSpecification fetchSpec = new EOFetchSpecification(migrationTableName(adaptor), new EOKeyValueQualifier("modelName", EOQualifier.QualifierOperatorEqual, model.name()), null);
      try {
        channel.selectAttributes(new NSArray<EOAttribute>(dbUpdaterEntity.attributeNamed("version")), fetchSpec, false, dbUpdaterEntity);
        NSDictionary nextRow = channel.fetchRow();
        if (nextRow == null) {
View Full Code Here

Examples of com.webobjects.eoaccess.EOModel.entityNamed()

    }
    try {
      EOModel dbUpdaterModel = dbUpdaterModelWithModel(model, adaptor);
      NSMutableDictionary<String, Object> row = new NSMutableDictionary<String, Object>();
      row.setObjectForKey(Integer.valueOf(versionNumber), "version");
      EOEntity dbUpdaterEntity = dbUpdaterModel.entityNamed(migrationTableName(adaptor));
      int count;
      try {
        count = channel.updateValuesInRowsDescribedByQualifier(row, new EOKeyValueQualifier("modelName", EOQualifier.QualifierOperatorEqual, model.name()), dbUpdaterEntity);
      }
      finally {
View Full Code Here

Examples of com.webobjects.eoaccess.EOModel.entityNamed()

    flags.setObjectForKey("NO", EOSchemaGeneration.CreatePrimaryKeySupportKey);
    flags.setObjectForKey("YES", EOSchemaGeneration.PrimaryKeyConstraintsKey);
    flags.setObjectForKey("NO", EOSchemaGeneration.ForeignKeyConstraintsKey);
    flags.setObjectForKey("NO", EOSchemaGeneration.CreateDatabaseKey);
    flags.setObjectForKey("NO", EOSchemaGeneration.DropDatabaseKey);
    String createTableScript = ERXSQLHelper.newSQLHelper(adaptor).createSchemaSQLForEntitiesWithOptions(new NSArray<EOEntity>(dbUpdaterModel.entityNamed(migrationTableName(adaptor))), adaptor, flags);
    return createTableScript;
  }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.