private void checkNameMatch(String expectedName, String actualName) {
   if ((expectedName != null) && (actualName != null)) {
     if (!expectedName.equals(actualName)) {
       throw FarragoResource.instance()
           .MockForeignObjectNotFound
           .ex(wrapper.getRepos().getLocalizedObjectName(actualName));
     }
   }
 }
 // implement DdlStmt
 public void preValidate(FarragoSessionDdlValidator ddlValidator) {
   super.preValidate(ddlValidator);
   if (parsedExpr instanceof SqlIdentifier) {
     catalogName = (SqlIdentifier) parsedExpr;
     if (!catalogName.isSimple()) {
       catalogName = null;
     }
   }
   if (catalogName == null) {
     throw FarragoResource.instance()
         .ValidatorSetCatalogInvalidExpr
         .ex(ddlValidator.getRepos().getLocalizedObjectName(valueString));
   }
 }
예제 #3
0
  /** Begins a new read/write transaction. */
  public void beginWriteTxn() {
    assert (!isTxnInProgress());

    if (readOnly) {
      throw FarragoResource.instance().CatalogReadOnly.ex();
    }

    if (manageReposSession) {
      repos.beginReposSession();
    }

    // NOTE jvs 12-Jan-2007:  don't change state until AFTER successfully
    // beginning a transaction; if beginReposTxn throws an excn,
    // we want to stay in State.NO_TXN

    repos.beginReposTxn(true);
    state = State.WRITE_TXN;
  }