1 23 24 package com.sun.jdo.spi.persistence.support.sqlstore.sql.generator; 25 26 import com.sun.jdo.spi.persistence.support.sqlstore.*; 27 import com.sun.jdo.spi.persistence.support.sqlstore.model.LocalFieldDesc; 28 29 import java.sql.ResultSet ; 30 import java.sql.SQLException ; 31 32 33 37 public class VerificationSelectPlan extends SelectQueryPlan { 38 39 45 public VerificationSelectPlan(RetrieveDesc desc, SQLStoreManager store) { 46 super(desc, store, null); 47 } 48 49 53 protected void processFields() { 54 LocalFieldDesc[] versionFields = config.getVersionFields(); 55 for (int i = 0; i < versionFields.length; i++) { 56 LocalFieldDesc versionField = versionFields[i]; 57 addTable(versionField); 58 } 59 } 60 61 protected Statement newStatement() { 62 return new SelectOneStatement(store.getVendorType(), this); 63 } 64 65 73 public Object getResult(PersistenceManager pm, ResultSet resultData) 74 throws SQLException { 75 boolean verificationSuccessfull = resultData.next(); 76 return Boolean.valueOf(verificationSuccessfull); 77 } 78 79 } 80 | Popular Tags |