FileDocCategorySizeDatePackage
VerificationSelectPlan.javaAPI DocGlassfish v2 API3789Fri May 04 22:35:16 BST 2007com.sun.jdo.spi.persistence.support.sqlstore.sql.generator

VerificationSelectPlan

public class VerificationSelectPlan extends SelectQueryPlan
Implements Select Plan for verifying clean VC instanses.
author
Mitesh Meswani

Fields Summary
Constructors Summary
public VerificationSelectPlan(RetrieveDesc desc, SQLStoreManager store)
Creates a new VerificationSelectQueryPlan.

param
desc The Retrieve descriptor holding constraints
param
store Store manager executing the query.

        super(desc, store, null);
    
Methods Summary
public java.lang.ObjectgetResult(PersistenceManager pm, java.sql.ResultSet resultData)
Checks whether the resultset from a verification query contains atleast one row.

param
pm This parameter is not used.
param
resultData The resultset containing result from the verification query
return
true if the resultset contains atleast one row false otherwise.
throws
SQLException

        boolean verificationSuccessfull = resultData.next();
        return Boolean.valueOf(verificationSuccessfull);
    
protected StatementnewStatement()

        return new SelectOneStatement(store.getVendorType(), this);
    
protected voidprocessFields()
There are no real fields to be selected for verification query. This method just adds the tables for the version field.

        LocalFieldDesc[] versionFields = config.getVersionFields();
        for (int i = 0; i < versionFields.length; i++) {
            LocalFieldDesc versionField = versionFields[i];
            addTable(versionField);
        }