com.fluidbpm.program.api.util.sql.impl.SQLFormUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fluid-api Show documentation
Show all versions of fluid-api Show documentation
Used for the
* Custom Program Step,
* Custom Actions,
* Scheduled Actions and
* Fluid API
in the Fluid BPM and Content Management system.
/*
* Koekiebox CONFIDENTIAL
*
* [2012] - [2017] Koekiebox (Pty) Ltd
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains the property
* of Koekiebox and its suppliers, if any. The intellectual and
* technical concepts contained herein are proprietary to Koekiebox
* and its suppliers and may be covered by South African and Foreign Patents,
* patents in process, and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material is strictly
* forbidden unless prior written permission is obtained from Koekiebox.
*/
package com.fluidbpm.program.api.util.sql.impl;
import com.fluidbpm.program.api.util.IFormAction;
import com.fluidbpm.program.api.util.cache.CacheUtil;
import com.fluidbpm.program.api.util.sql.ABaseSQLUtil;
import com.fluidbpm.program.api.util.sql.exception.FluidSQLException;
import com.fluidbpm.program.api.util.sql.syntax.ISyntax;
import com.fluidbpm.program.api.util.sql.syntax.SyntaxFactory;
import com.fluidbpm.program.api.vo.field.Field;
import com.fluidbpm.program.api.vo.form.Form;
import com.fluidbpm.program.api.vo.item.FluidItem;
import com.fluidbpm.program.api.vo.user.User;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* SQL Utility class used for {@code Form} related actions.
*
* @author jasonbruwer
* @since v1.0
*
* @see ABaseSQLUtil
* @see Form
* @see IFormAction
*/
public class SQLFormUtil extends ABaseSQLUtil implements IFormAction {
private SQLFormDefinitionUtil formDefUtil = null;
private SQLFormFieldUtil fieldUtil = null;
/**
* Contains the SQL column indexes for {@code Form}.
*/
public static class SQLColumnIndex {
public static final int _01_FORM_ID = 1;
public static final int _02_FORM_TYPE = 2;
public static final int _03_TITLE = 3;
public static final int _04_CREATED = 4;
public static final int _05_LAST_UPDATED = 5;
public static final int _06_CURRENT_USER_ID = 6;
//additional...
public static final int _07_FORM_CONTAINER_STATE = 7;
public static final int _08_FORM_CONTAINER_FLOW_STATE = 8;
}
/**
* New instance using provided {@code connectionParam}.
*
* @param connectionParam SQL Connection to use.
* @param cacheUtilParam The Cache Util for better performance.
*/
public SQLFormUtil(Connection connectionParam, CacheUtil cacheUtilParam) {
super(connectionParam, cacheUtilParam);
this.formDefUtil = new SQLFormDefinitionUtil(connectionParam);
this.fieldUtil = new SQLFormFieldUtil(
connectionParam, cacheUtilParam, this.formDefUtil);
}
/**
* New instance using provided {@code connectionParam}.
*
* @param connectionParam SQL Connection to use.
*/
public SQLFormUtil(Connection connectionParam) {
this(connectionParam, null);
}
/**
* Retrieves the Table field records as {@code List