congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
StdJDBCDelegate.closeResultSet
Code IndexAdd Tabnine to your IDE (free)

How to use
closeResultSet
method
in
org.quartz.impl.jdbcjobstore.StdJDBCDelegate

Best Java code snippets using org.quartz.impl.jdbcjobstore.StdJDBCDelegate.closeResultSet (Showing top 20 results out of 315)

origin: quartz-scheduler/quartz

private boolean isTriggerStillPresent(PreparedStatement ps) throws SQLException {
  ResultSet rs = null;
  try {
    rs = ps.executeQuery();
    return rs.next();
  } finally {
    closeResultSet(rs);
  }
}
origin: quartz-scheduler/quartz

private boolean isTriggerStillPresent(PreparedStatement ps) throws SQLException {
  ResultSet rs = null;
  try {
    rs = ps.executeQuery();
    return rs.next();
  } finally {
    closeResultSet(rs);
  }
}
origin: quartz-scheduler/quartz

public boolean isTriggerGroupPaused(Connection conn, String groupName)
  throws SQLException {
  PreparedStatement ps = null;
  ResultSet rs = null;
  try {
    ps = conn.prepareStatement(rtp(SELECT_PAUSED_TRIGGER_GROUP));
    ps.setString(1, groupName);
    rs = ps.executeQuery();
    return rs.next();
  } finally {
    closeResultSet(rs);
    closeStatement(ps);
  }
}
origin: quartz-scheduler/quartz

public boolean isTriggerGroupPaused(Connection conn, String groupName)
  throws SQLException {
  PreparedStatement ps = null;
  ResultSet rs = null;
  try {
    ps = conn.prepareStatement(rtp(SELECT_PAUSED_TRIGGER_GROUP));
    ps.setString(1, groupName);
    rs = ps.executeQuery();
    return rs.next();
  } finally {
    closeResultSet(rs);
    closeStatement(ps);
  }
}
origin: quartz-scheduler/quartz

public boolean isExistingTriggerGroup(Connection conn, String groupName)
  throws SQLException {
  PreparedStatement ps = null;
  ResultSet rs = null;
  try {
    ps = conn.prepareStatement(rtp(SELECT_NUM_TRIGGERS_IN_GROUP));
    ps.setString(1, groupName);
    rs = ps.executeQuery();
    if (!rs.next()) {
      return false;
    }
    return (rs.getInt(1) > 0);
  } finally {
    closeResultSet(rs);
    closeStatement(ps);
  }
}
origin: quartz-scheduler/quartz

public boolean isExistingTriggerGroup(Connection conn, String groupName)
  throws SQLException {
  PreparedStatement ps = null;
  ResultSet rs = null;
  try {
    ps = conn.prepareStatement(rtp(SELECT_NUM_TRIGGERS_IN_GROUP));
    ps.setString(1, groupName);
    rs = ps.executeQuery();
    if (!rs.next()) {
      return false;
    }
    return (rs.getInt(1) > 0);
  } finally {
    closeResultSet(rs);
    closeStatement(ps);
  }
}
origin: quartz-scheduler/quartz

/** 
 * @see org.quartz.impl.jdbcjobstore.DriverDelegate#selectPausedTriggerGroups(java.sql.Connection)
 */
public Set<String> selectPausedTriggerGroups(Connection conn) throws SQLException {
  PreparedStatement ps = null;
  ResultSet rs = null;
  HashSet<String> set = new HashSet<String>();
  try {
    ps = conn.prepareStatement(rtp(SELECT_PAUSED_TRIGGER_GROUPS));
    rs = ps.executeQuery();
    while (rs.next()) {
      String groupName = rs.getString(COL_TRIGGER_GROUP);
      set.add(groupName);
    }
    return set;
  } finally {
    closeResultSet(rs);
    closeStatement(ps);
  }
}
origin: quartz-scheduler/quartz

/** 
 * @see org.quartz.impl.jdbcjobstore.DriverDelegate#selectPausedTriggerGroups(java.sql.Connection)
 */
public Set<String> selectPausedTriggerGroups(Connection conn) throws SQLException {
  PreparedStatement ps = null;
  ResultSet rs = null;
  HashSet<String> set = new HashSet<String>();
  try {
    ps = conn.prepareStatement(rtp(SELECT_PAUSED_TRIGGER_GROUPS));
    rs = ps.executeQuery();
    while (rs.next()) {
      String groupName = rs.getString(COL_TRIGGER_GROUP);
      set.add(groupName);
    }
    return set;
  } finally {
    closeResultSet(rs);
    closeStatement(ps);
  }
}
origin: quartz-scheduler/quartz

public List<String> selectTriggerGroups(Connection conn, GroupMatcher<TriggerKey> matcher) throws SQLException {
  PreparedStatement ps = null;
  ResultSet rs = null;
  try {
    ps = conn.prepareStatement(rtp(SELECT_TRIGGER_GROUPS_FILTERED));
    ps.setString(1, toSqlLikeClause(matcher));
    rs = ps.executeQuery();
    LinkedList<String> list = new LinkedList<String>();
    while (rs.next()) {
      list.add(rs.getString(1));
    }
    return list;
  } finally {
    closeResultSet(rs);
    closeStatement(ps);
  }
}
origin: quartz-scheduler/quartz

public List<String> selectTriggerGroups(Connection conn, GroupMatcher<TriggerKey> matcher) throws SQLException {
  PreparedStatement ps = null;
  ResultSet rs = null;
  try {
    ps = conn.prepareStatement(rtp(SELECT_TRIGGER_GROUPS_FILTERED));
    ps.setString(1, toSqlLikeClause(matcher));
    rs = ps.executeQuery();
    LinkedList<String> list = new LinkedList<String>();
    while (rs.next()) {
      list.add(rs.getString(1));
    }
    return list;
  } finally {
    closeResultSet(rs);
    closeStatement(ps);
  }
}
origin: quartz-scheduler/quartz

public List<TriggerKey> selectMisfiredTriggersInState(Connection conn, String state,
    long ts) throws SQLException {
  PreparedStatement ps = null;
  ResultSet rs = null;
  try {
    ps = conn.prepareStatement(rtp(SELECT_MISFIRED_TRIGGERS_IN_STATE));
    ps.setBigDecimal(1, new BigDecimal(String.valueOf(ts)));
    ps.setString(2, state);
    rs = ps.executeQuery();
    LinkedList<TriggerKey> list = new LinkedList<TriggerKey>();
    while (rs.next()) {
      String triggerName = rs.getString(COL_TRIGGER_NAME);
      String groupName = rs.getString(COL_TRIGGER_GROUP);
      list.add(triggerKey(triggerName, groupName));
    }
    return list;
  } finally {
    closeResultSet(rs);
    closeStatement(ps);
  }
}
origin: quartz-scheduler/quartz

public int selectJobExecutionCount(Connection conn, JobKey jobKey) throws SQLException {
  PreparedStatement ps = null;
  ResultSet rs = null;
  try {
    ps = conn.prepareStatement(rtp(SELECT_JOB_EXECUTION_COUNT));
    ps.setString(1, jobKey.getName());
    ps.setString(2, jobKey.getGroup());
    rs = ps.executeQuery();
    return (rs.next()) ? rs.getInt(1) : 0;
  } finally {
    closeResultSet(rs);
    closeStatement(ps);
  }
}

origin: quartz-scheduler/quartz

public List<TriggerKey> selectMisfiredTriggersInState(Connection conn, String state,
    long ts) throws SQLException {
  PreparedStatement ps = null;
  ResultSet rs = null;
  try {
    ps = conn.prepareStatement(rtp(SELECT_MISFIRED_TRIGGERS_IN_STATE));
    ps.setBigDecimal(1, new BigDecimal(String.valueOf(ts)));
    ps.setString(2, state);
    rs = ps.executeQuery();
    LinkedList<TriggerKey> list = new LinkedList<TriggerKey>();
    while (rs.next()) {
      String triggerName = rs.getString(COL_TRIGGER_NAME);
      String groupName = rs.getString(COL_TRIGGER_GROUP);
      list.add(triggerKey(triggerName, groupName));
    }
    return list;
  } finally {
    closeResultSet(rs);
    closeStatement(ps);
  }
}
origin: quartz-scheduler/quartz

public int selectJobExecutionCount(Connection conn, JobKey jobKey) throws SQLException {
  PreparedStatement ps = null;
  ResultSet rs = null;
  try {
    ps = conn.prepareStatement(rtp(SELECT_JOB_EXECUTION_COUNT));
    ps.setString(1, jobKey.getName());
    ps.setString(2, jobKey.getGroup());
    rs = ps.executeQuery();
    return (rs.next()) ? rs.getInt(1) : 0;
  } finally {
    closeResultSet(rs);
    closeStatement(ps);
  }
}

origin: quartz-scheduler/quartz

/**
 * <p>
 * Select all of the job group names that are stored.
 * </p>
 * 
 * @param conn
 *          the DB Connection
 * @return an array of <code>String</code> group names
 */
public List<String> selectJobGroups(Connection conn) throws SQLException {
  PreparedStatement ps = null;
  ResultSet rs = null;
  try {
    ps = conn.prepareStatement(rtp(SELECT_JOB_GROUPS));
    rs = ps.executeQuery();
    LinkedList<String> list = new LinkedList<String>();
    while (rs.next()) {
      list.add(rs.getString(1));
    }
    return list;
  } finally {
    closeResultSet(rs);
    closeStatement(ps);
  }
}
origin: quartz-scheduler/quartz

public List<OperableTrigger> selectTriggersForCalendar(Connection conn, String calName)
  throws SQLException, ClassNotFoundException, IOException, JobPersistenceException {
  LinkedList<OperableTrigger> trigList = new LinkedList<OperableTrigger>();
  PreparedStatement ps = null;
  ResultSet rs = null;
  try {
    ps = conn.prepareStatement(rtp(SELECT_TRIGGERS_FOR_CALENDAR));
    ps.setString(1, calName);
    rs = ps.executeQuery();
    while (rs.next()) {
      trigList.add(selectTrigger(conn, triggerKey(rs.getString(COL_TRIGGER_NAME), rs.getString(COL_TRIGGER_GROUP))));
    }
  } finally {
    closeResultSet(rs);
    closeStatement(ps);
  }
  return trigList;
}
origin: quartz-scheduler/quartz

public List<OperableTrigger> selectTriggersForCalendar(Connection conn, String calName)
  throws SQLException, ClassNotFoundException, IOException, JobPersistenceException {
  LinkedList<OperableTrigger> trigList = new LinkedList<OperableTrigger>();
  PreparedStatement ps = null;
  ResultSet rs = null;
  try {
    ps = conn.prepareStatement(rtp(SELECT_TRIGGERS_FOR_CALENDAR));
    ps.setString(1, calName);
    rs = ps.executeQuery();
    while (rs.next()) {
      trigList.add(selectTrigger(conn, triggerKey(rs.getString(COL_TRIGGER_NAME), rs.getString(COL_TRIGGER_GROUP))));
    }
  } finally {
    closeResultSet(rs);
    closeStatement(ps);
  }
  return trigList;
}
origin: quartz-scheduler/quartz

/**
 * <p>
 * Select the total number of calendars stored.
 * </p>
 * 
 * @param conn
 *          the DB Connection
 * @return the total number of calendars stored
 */
public int selectNumCalendars(Connection conn) throws SQLException {
  PreparedStatement ps = null;
  ResultSet rs = null;
  try {
    int count = 0;
    ps = conn.prepareStatement(rtp(SELECT_NUM_CALENDARS));
    rs = ps.executeQuery();
    if (rs.next()) {
      count = rs.getInt(1);
    }
    return count;
  } finally {
    closeResultSet(rs);
    closeStatement(ps);
  }
}
origin: quartz-scheduler/quartz

/**
 * <p>
 * Check whether or not the given job is stateful.
 * </p>
 * 
 * @param conn
 *          the DB Connection
 * @return true if the job exists and is stateful, false otherwise
 */
public boolean isJobNonConcurrent(Connection conn, JobKey jobKey) throws SQLException {
  PreparedStatement ps = null;
  ResultSet rs = null;
  try {
    ps = conn.prepareStatement(rtp(SELECT_JOB_NONCONCURRENT));
    ps.setString(1, jobKey.getName());
    ps.setString(2, jobKey.getGroup());
    rs = ps.executeQuery();
    if (!rs.next()) { return false; }
    return getBoolean(rs, COL_IS_NONCONCURRENT);
  } finally {
    closeResultSet(rs);
    closeStatement(ps);
  }
}
origin: quartz-scheduler/quartz

/**
 * <p>
 * Check whether or not the given job is stateful.
 * </p>
 * 
 * @param conn
 *          the DB Connection
 * @return true if the job exists and is stateful, false otherwise
 */
public boolean isJobNonConcurrent(Connection conn, JobKey jobKey) throws SQLException {
  PreparedStatement ps = null;
  ResultSet rs = null;
  try {
    ps = conn.prepareStatement(rtp(SELECT_JOB_NONCONCURRENT));
    ps.setString(1, jobKey.getName());
    ps.setString(2, jobKey.getGroup());
    rs = ps.executeQuery();
    if (!rs.next()) { return false; }
    return getBoolean(rs, COL_IS_NONCONCURRENT);
  } finally {
    closeResultSet(rs);
    closeStatement(ps);
  }
}
org.quartz.impl.jdbcjobstoreStdJDBCDelegatecloseResultSet

Javadoc

Cleanup helper method that closes the given ResultSet while ignoring any errors.

Popular methods of StdJDBCDelegate

  • canUseProperties
  • closeStatement
    Cleanup helper method that closes the given Statement while ignoring any errors.
  • convertFromProperty
    convert the JobDataMap into a list of properties
  • convertToProperty
    convert the JobDataMap into a list of properties
  • getBoolean
    Retrieves the value of the designated column in the current row as a boolean. This just wraps Result
  • getKeyOfNonSerializableValue
    Find the key of the first non-serializable value in the given Map.
  • getMapFromProperties
    build Map from java.util.Properties encoding.
  • getObjectFromBlob
    This method should be overridden by any delegate subclasses that need special handling for BLOBs. T
  • rtp
    Replace the table prefix in a query by replacing any occurrences of "{0}" with the table prefix.
  • selectTrigger
    Select a trigger.
  • selectTriggerJobDataMap
    Select a trigger's JobDataMap.
  • serializeJobData
    Remove the transient data from and then create a serialized java.util.ByteArrayOutputStream versio
  • selectTriggerJobDataMap,
  • serializeJobData,
  • serializeObject,
  • serializeProperties,
  • setBoolean,
  • setBytes,
  • addDefaultTriggerPersistenceDelegates,
  • addTriggerPersistenceDelegate,
  • deleteBlobTrigger

Popular in Java

  • Making http requests using okhttp
  • compareTo (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Collectors (java.util.stream)
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now