| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| PreparedObject |
|
| 1.3333333333333333;1.333 |
| 1 | /* | |
| 2 | * Copyright 2007-2009 The Kuali Foundation | |
| 3 | * | |
| 4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
| 5 | * you may not use this file except in compliance with the License. | |
| 6 | * You may obtain a copy of the License at | |
| 7 | * | |
| 8 | * http://www.opensource.org/licenses/ecl2.php | |
| 9 | * | |
| 10 | * Unless required by applicable law or agreed to in writing, software | |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | * See the License for the specific language governing permissions and | |
| 14 | * limitations under the License. | |
| 15 | */ | |
| 16 | package org.kuali.rice.core.jdbc; | |
| 17 | ||
| 18 | import java.util.ArrayList; | |
| 19 | import java.util.List; | |
| 20 | ||
| 21 | /** | |
| 22 | * This is a description of what this class does - Garey don't forget to fill this in. | |
| 23 | * | |
| 24 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 25 | * | |
| 26 | */ | |
| 27 | 0 | public class PreparedObject { |
| 28 | ||
| 29 | 0 | String sql = new String(); |
| 30 | 0 | List<Object> objectList = new ArrayList(); |
| 31 | ||
| 32 | ||
| 33 | /** | |
| 34 | * @return the sql | |
| 35 | */ | |
| 36 | public String getSql() { | |
| 37 | 0 | return this.sql; |
| 38 | } | |
| 39 | /** | |
| 40 | * @param sql the sql to set | |
| 41 | */ | |
| 42 | public void setSql(String sql) { | |
| 43 | 0 | this.sql = sql; |
| 44 | 0 | } |
| 45 | /** | |
| 46 | * @return the objectList | |
| 47 | */ | |
| 48 | public List<Object> getObjectList() { | |
| 49 | 0 | return this.objectList; |
| 50 | } | |
| 51 | /** | |
| 52 | * @param objectList the objectList to set | |
| 53 | */ | |
| 54 | public void setObjectList(List<Object> objectList) { | |
| 55 | 0 | this.objectList = objectList; |
| 56 | 0 | } |
| 57 | ||
| 58 | public void append(PreparedObject po){ | |
| 59 | 0 | if(sql == null) sql = new String(); |
| 60 | 0 | if(objectList == null) objectList = new ArrayList<Object>(); |
| 61 | ||
| 62 | 0 | sql += po.getSql(); |
| 63 | 0 | objectList.addAll(po.getObjectList()); |
| 64 | 0 | } |
| 65 | ||
| 66 | public String toString(){ | |
| 67 | 0 | return this.sql; |
| 68 | } | |
| 69 | ||
| 70 | ||
| 71 | ||
| 72 | } |