Java Code Examples for org.skife.jdbi.v2.sqlobject.BindBean

The following examples show how to use org.skife.jdbi.v2.sqlobject.BindBean. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: airpal   Source File: JobOutputDAO.java    License: Apache License 2.0 5 votes vote down vote up
@SqlUpdate(
        "INSERT INTO job_outputs (type, description, location, job_id) " +
                "VALUES (:type, :description, :location, :jobId)")
@GetGeneratedKeys
long createJobOutput(
        @BindBean PersistentJobOutput output,
        @Bind("jobId") long jobId
);
 
Example 2
Source Project: SAPNetworkMonitor   Source File: MonitorDao.java    License: GNU General Public License v3.0 4 votes vote down vote up
@SqlUpdate("INSERT INTO SNM_MONITOR (MONITOR_ID, VERSION, ACCOUNT_ID, NAME, COUNTRY, PROVINCE, CITY, ISP, AREA, IP, NIPING_T, STATUS, CREATION_TIME, MODIFIED_TIME) " +
        " VALUES (:monitorId, :version, :accountId, :name, :country, :province, :city, :isp, :area, :ip, :nipingT, :status, :creationTime, :modifiedTime)")
void insertMonitor(@BindBean Monitor monitor);
 
Example 3
Source Project: SAPNetworkMonitor   Source File: MonitorDao.java    License: GNU General Public License v3.0 4 votes vote down vote up
@SqlUpdate("UPDATE SNM_MONITOR SET ACCOUNT_ID = :accountId, VERSION = :version, NAME = :name, COUNTRY = :country, PROVINCE = :province, CITY = :city, ISP = :isp, AREA = :area, " +
        " IP = :ip, NIPING_T = :nipingT, MODIFIED_TIME = :modifiedTime WHERE MONITOR_ID = :monitorId")
void updateMonitorNiping(@BindBean Monitor monitor);
 
Example 4
Source Project: SAPNetworkMonitor   Source File: TaskDao.java    License: GNU General Public License v3.0 4 votes vote down vote up
@SqlUpdate("INSERT INTO SNM_TASK (TASK_ID, ACCOUNT_ID, NAME, TASK_INTERVAL, CONFIG_JSON, STATUS, CREATION_TIME, MODIFIED_TIME)" +
        " VALUES (:taskId, :accountId, :name, :interval, :configJson, :status, :creationTime, :modifiedTime)")
void insertTask(@BindBean Task task);
 
Example 5
Source Project: SAPNetworkMonitor   Source File: TaskDao.java    License: GNU General Public License v3.0 4 votes vote down vote up
@SqlUpdate("UPDATE SNM_TASK SET NAME = :name, TASK_INTERVAL = :interval, CONFIG_JSON = :configJson, MODIFIED_TIME = :modifiedTime WHERE TASK_ID = :taskId AND ACCOUNT_ID = :accountId")
void updateTask(@BindBean Task task) ;
 
Example 6
@SqlUpdate("INSERT INTO SNM_NIPING_RESULT (ACCOUNT_ID, MONITOR_ID, TASK_ID, COLLECTED_TIME, TYPE, START_TIME, END_TIME, ERRNO, AVG, " +
        "MAX, MIN, TR, AV2, TR2, ERRMSG, CREATION_TIME, MODIFIED_TIME) " +
        " VALUES (:accountId, :monitorId, :taskId, :collectedTime, :type, :startTime, :endTime, :errno, :avg, :max, :min, :tr, :av2, " +
        ":tr2, :errmsg, :creationTime, :modifiedTime)")
void saveMonitorNiPingResult(@BindBean MonitorNiPingResult monitorNiPingResult);
 
Example 7
Source Project: rufus   Source File: UserDao.java    License: MIT License 4 votes vote down vote up
@RegisterMapper(UserMapper.class)
@SqlUpdate("insert into rufususer (EMAIL, PASSWORD) values (:email, :password)")
void addUser(@BindBean User user);
 
Example 8
Source Project: cassandra-reaper   Source File: IStoragePostgreSql.java    License: Apache License 2.0 4 votes vote down vote up
@SqlUpdate(SQL_UPDATE_CLUSTER)
int updateCluster(
    @BindBean Cluster newCluster);
 
Example 9
Source Project: cassandra-reaper   Source File: IStoragePostgreSql.java    License: Apache License 2.0 4 votes vote down vote up
@SqlUpdate(SQL_INSERT_REPAIR_RUN)
@GetGeneratedKeys
long insertRepairRun(
    @BindBean RepairRun newRepairRun);
 
Example 10
Source Project: cassandra-reaper   Source File: IStoragePostgreSql.java    License: Apache License 2.0 4 votes vote down vote up
@SqlUpdate(SQL_UPDATE_REPAIR_RUN)
int updateRepairRun(
    @BindBean RepairRun newRepairRun);
 
Example 11
Source Project: cassandra-reaper   Source File: IStoragePostgreSql.java    License: Apache License 2.0 4 votes vote down vote up
@SqlUpdate(SQL_INSERT_REPAIR_UNIT)
@GetGeneratedKeys
long insertRepairUnit(
    @BindBean RepairUnit newRepairUnit);
 
Example 12
Source Project: cassandra-reaper   Source File: IStoragePostgreSql.java    License: Apache License 2.0 4 votes vote down vote up
@SqlBatch(SQL_INSERT_REPAIR_SEGMENT)
@BatchChunkSize(500)
void insertRepairSegments(@BindBean Iterator<PostgresRepairSegment> iterator);
 
Example 13
Source Project: cassandra-reaper   Source File: IStoragePostgreSql.java    License: Apache License 2.0 4 votes vote down vote up
@SqlUpdate(SQL_UPDATE_REPAIR_SEGMENT)
int updateRepairSegment(
    @BindBean RepairSegment newRepairSegment);
 
Example 14
Source Project: cassandra-reaper   Source File: IStoragePostgreSql.java    License: Apache License 2.0 4 votes vote down vote up
@SqlUpdate(SQL_INSERT_REPAIR_SCHEDULE)
@GetGeneratedKeys
long insertRepairSchedule(
    @BindBean RepairSchedule newRepairSchedule);
 
Example 15
Source Project: cassandra-reaper   Source File: IStoragePostgreSql.java    License: Apache License 2.0 4 votes vote down vote up
@SqlUpdate(SQL_UPDATE_REPAIR_SCHEDULE)
int updateRepairSchedule(
    @BindBean RepairSchedule newRepairSchedule);
 
Example 16
Source Project: cassandra-reaper   Source File: IStoragePostgreSql.java    License: Apache License 2.0 4 votes vote down vote up
@SqlUpdate(SQL_SAVE_SNAPSHOT)
int saveSnapshot(@BindBean Snapshot snapshot);
 
Example 17
Source Project: cassandra-reaper   Source File: IStoragePostgreSql.java    License: Apache License 2.0 4 votes vote down vote up
@SqlUpdate(SQL_INSERT_EVENT_SUBSCRIPTION)
@GetGeneratedKeys
long insertDiagEventSubscription(
        @BindBean DiagEventSubscription subscription);
 
Example 18
Source Project: quark   Source File: JdbcSourceDAO.java    License: Apache License 2.0 4 votes vote down vote up
@GetGeneratedKeys
@SqlUpdate("update jdbc_sources set username = :j.username,"
    + " password = :j.password where id = :j.id")
protected abstract int updateJdbc(@BindBean("j") JdbcSource source);
 
Example 19
Source Project: quark   Source File: QuboleDbSourceDAO.java    License: Apache License 2.0 4 votes vote down vote up
@GetGeneratedKeys
@SqlUpdate("update quboledb_sources set dbtap_id = :d.dbTapId,"
    + " auth_token = :d.authToken where id = :d.id")
protected abstract int updateQubole(@BindBean("d") QuboleDbSource db);
 
Example 20
Source Project: quark   Source File: DataSourceDAO.java    License: Apache License 2.0 4 votes vote down vote up
@GetGeneratedKeys
@SqlUpdate("update data_sources set name = :d.name,"
    + " type = :d.type, datasource_type = :d.datasourceType,"
    + " url = :d.url, ds_set_id = :d.dsSetId where id = :d.id")
public abstract int update(@BindBean("d") DataSource ds);
 
Example 21
Source Project: quark   Source File: ViewDAO.java    License: Apache License 2.0 4 votes vote down vote up
@SqlUpdate("update partitions set name = :v.name, description = :v.description, "
    + "query = :v.query, cost = :v.cost, schema_name = :v.schema, "
    + "table_name = :v.table, destination_id = :v.destinationId where id = :v.id and ds_set_id = :ds_set_id")
int update(@BindBean("v") View view, @Bind("ds_set_id") long dsSetId);
 
Example 22
Source Project: breakerbox   Source File: ServiceDB.java    License: Apache License 2.0 4 votes vote down vote up
@SqlQuery("select * from service where name = :service.serviceId and dependency = :service.dependencyId")
ServiceModel find(@BindBean("service") ServiceModel service);
 
Example 23
Source Project: breakerbox   Source File: ServiceDB.java    License: Apache License 2.0 4 votes vote down vote up
@SqlUpdate("insert into service (name, dependency) values (:service.serviceId, :service.dependencyId)")
int insert(@BindBean("service") ServiceModel service);
 
Example 24
Source Project: breakerbox   Source File: ServiceDB.java    License: Apache License 2.0 4 votes vote down vote up
@SqlUpdate("delete from service where name = :service.serviceId and dependency = :service.dependencyId")
int delete(@BindBean("service") ServiceModel serviceModel);
 
Example 25
Source Project: breakerbox   Source File: ServiceDB.java    License: Apache License 2.0 4 votes vote down vote up
@SqlQuery("select * from service where name = :serviceId.id")
ImmutableList<ServiceModel> all(@BindBean("serviceId") ServiceId serviceId);
 
Example 26
Source Project: breakerbox   Source File: DependencyDB.java    License: Apache License 2.0 4 votes vote down vote up
@SqlQuery("select * from dependency where name = :dependency.id and timestamp = :timestamp.millis")
DependencyModel find(@BindBean("dependency") DependencyId dependencyId, @BindBean("timestamp") DateTime timestamp);
 
Example 27
Source Project: breakerbox   Source File: DependencyDB.java    License: Apache License 2.0 4 votes vote down vote up
@SqlUpdate("insert into dependency (name, timestamp, tenacity_configuration, username, service) values " +
           "(:dependency.dependencyId, :dependency.dateTime, :dependency.tenacityConfiguration," +
           " :dependency.user, :dependency.serviceId)")
int insert(@BindBean("dependency") DependencyModel dependencyModel);
 
Example 28
Source Project: breakerbox   Source File: DependencyDB.java    License: Apache License 2.0 4 votes vote down vote up
@SqlUpdate("delete from dependency where name = :dependency.id and timestamp = :timestamp.millis")
int delete(@BindBean("dependency") DependencyId dependencyId, @BindBean("timestamp") DateTime timestamp);
 
Example 29
Source Project: breakerbox   Source File: DependencyDB.java    License: Apache License 2.0 4 votes vote down vote up
@SqlQuery("select * from dependency where name = :dependency.id and service = :service.id order by timestamp desc limit 1")
DependencyModel findLatest(@BindBean("dependency") DependencyId dependencyId, @BindBean("service") ServiceId serviceId);
 
Example 30
Source Project: breakerbox   Source File: DependencyDB.java    License: Apache License 2.0 4 votes vote down vote up
@SqlQuery("select * from dependency where name = :dependency.id and service = :service.id order by timestamp desc")
ImmutableList<DependencyModel> all(@BindBean("dependency") DependencyId dependencyId, @BindBean("service") ServiceId serviceId);