test_class.declarator: cmdletDao
test_class.modifier: private
test_class.original_string: private CmdletDao cmdletDao;
test_class.type: CmdletDao
test_class.var_name: cmdletDao
test_class.file: smart-metastore/src/test/java/org/smartdata/metastore/dao/TestCmdletDao.java
test_class.identifier: TestCmdletDao
test_class.superclass: extends TestDaoUtil
test_case.body: @Test
    public void testgetByRid() throws Exception{
      CmdletInfo cmdlet1 = new CmdletInfo(0, 1,
              CmdletState.EXECUTING, "test", 123123333L, 232444444L);
      CmdletInfo cmdlet2 = new CmdletInfo(1, 1,
              CmdletState.PAUSED, "tt", 123178333L, 232444994L);
      CmdletInfo cmdlet3 = new CmdletInfo(2, 1,
              CmdletState.EXECUTING, "test", 123123333L, 232444444L);
      CmdletInfo cmdlet4 = new CmdletInfo(3, 1,
              CmdletState.PAUSED, "tt", 123178333L, 232444994L);
      CmdletInfo cmdlet5 = new CmdletInfo(4, 1,
              CmdletState.EXECUTING, "test", 123123333L, 232444444L);
      CmdletInfo cmdlet6 = new CmdletInfo(5, 1,
              CmdletState.PAUSED, "tt", 123178333L, 232444994L);
      cmdletDao.insert(new CmdletInfo[]{cmdlet1, cmdlet2, cmdlet3, cmdlet4, cmdlet5, cmdlet6});
      List<CmdletInfo> cmdlets = cmdletDao.getByRid(1, 1, 2);
      List<String> order = new ArrayList<>();
      order.add("cid");
      List<Boolean> desc = new ArrayList<>();
      desc.add(false);
      Assert.assertTrue(cmdlets.size() == 2);
      cmdlets = cmdletDao.getByRid(1, 1, 2, order, desc);
      Assert.assertTrue(cmdlets.size() == 2);
      Assert.assertTrue(cmdlets.get(0).equals(cmdlet2));
      Assert.assertTrue(cmdletDao.getNumByRid(1) == 6);
    }
test_case.class_method_signature: TestCmdletDao.testgetByRid()
test_case.full_signature: @Test public void testgetByRid()
test_case.identifier: testgetByRid
test_case.invocations: insert getByRid add add assertTrue size getByRid assertTrue size assertTrue equals get assertTrue getNumByRid
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testgetByRid()
focal_class.declarator: dataSource
focal_class.modifier: private
focal_class.original_string: private DataSource dataSource;
focal_class.type: DataSource
focal_class.var_name: dataSource
focal_class.declarator: TABLE_NAME = "cmdlet"
focal_class.modifier: private static final
focal_class.original_string: private static final String TABLE_NAME = "cmdlet";
focal_class.type: String
focal_class.var_name: TABLE_NAME
focal_class.declarator: terminiatedStates
focal_class.modifier: private final
focal_class.original_string: private final String terminiatedStates;
focal_class.type: String
focal_class.var_name: terminiatedStates
focal_class.file: smart-metastore/src/main/java/org/smartdata/metastore/dao/CmdletDao.java
focal_class.identifier: CmdletDao
focal_class.class_method_signature: CmdletDao.setDataSource(DataSource dataSource)
focal_class.full_signature: public void setDataSource(DataSource dataSource)
focal_class.identifier: setDataSource
focal_class.modifiers: public
focal_class.parameters: (DataSource dataSource)
focal_class.return: void
focal_class.signature: void setDataSource(DataSource dataSource)
focal_class.class_method_signature: CmdletDao.CmdletDao(DataSource dataSource)
focal_class.full_signature: public  CmdletDao(DataSource dataSource)
focal_class.identifier: CmdletDao
focal_class.modifiers: public
focal_class.parameters: (DataSource dataSource)
focal_class.signature:  CmdletDao(DataSource dataSource)
focal_class.class_method_signature: CmdletDao.getAll()
focal_class.full_signature: public List<CmdletInfo> getAll()
focal_class.identifier: getAll
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<CmdletInfo>
focal_class.signature: List<CmdletInfo> getAll()
focal_class.class_method_signature: CmdletDao.getAPageOfCmdlet(long start, long offset,
        List<String> orderBy, List<Boolean> isDesc)
focal_class.full_signature: public List<CmdletInfo> getAPageOfCmdlet(long start, long offset,
        List<String> orderBy, List<Boolean> isDesc)
focal_class.identifier: getAPageOfCmdlet
focal_class.modifiers: public
focal_class.parameters: (long start, long offset,
        List<String> orderBy, List<Boolean> isDesc)
focal_class.return: List<CmdletInfo>
focal_class.signature: List<CmdletInfo> getAPageOfCmdlet(long start, long offset,
        List<String> orderBy, List<Boolean> isDesc)
focal_class.class_method_signature: CmdletDao.getAPageOfCmdlet(long start, long offset)
focal_class.full_signature: public List<CmdletInfo> getAPageOfCmdlet(long start, long offset)
focal_class.identifier: getAPageOfCmdlet
focal_class.modifiers: public
focal_class.parameters: (long start, long offset)
focal_class.return: List<CmdletInfo>
focal_class.signature: List<CmdletInfo> getAPageOfCmdlet(long start, long offset)
focal_class.class_method_signature: CmdletDao.getByIds(List<Long> aids)
focal_class.full_signature: public List<CmdletInfo> getByIds(List<Long> aids)
focal_class.identifier: getByIds
focal_class.modifiers: public
focal_class.parameters: (List<Long> aids)
focal_class.return: List<CmdletInfo>
focal_class.signature: List<CmdletInfo> getByIds(List<Long> aids)
focal_class.class_method_signature: CmdletDao.getById(long cid)
focal_class.full_signature: public CmdletInfo getById(long cid)
focal_class.identifier: getById
focal_class.modifiers: public
focal_class.parameters: (long cid)
focal_class.return: CmdletInfo
focal_class.signature: CmdletInfo getById(long cid)
focal_class.class_method_signature: CmdletDao.getByRid(long rid)
focal_class.full_signature: public List<CmdletInfo> getByRid(long rid)
focal_class.identifier: getByRid
focal_class.modifiers: public
focal_class.parameters: (long rid)
focal_class.return: List<CmdletInfo>
focal_class.signature: List<CmdletInfo> getByRid(long rid)
focal_class.class_method_signature: CmdletDao.getNumByRid(long rid)
focal_class.full_signature: public long getNumByRid(long rid)
focal_class.identifier: getNumByRid
focal_class.modifiers: public
focal_class.parameters: (long rid)
focal_class.return: long
focal_class.signature: long getNumByRid(long rid)
focal_class.class_method_signature: CmdletDao.getByRid(long rid, long start, long offset)
focal_class.full_signature: public List<CmdletInfo> getByRid(long rid, long start, long offset)
focal_class.identifier: getByRid
focal_class.modifiers: public
focal_class.parameters: (long rid, long start, long offset)
focal_class.return: List<CmdletInfo>
focal_class.signature: List<CmdletInfo> getByRid(long rid, long start, long offset)
focal_class.class_method_signature: CmdletDao.getByRid(long rid, long start, long offset,
        List<String> orderBy, List<Boolean> isDesc)
focal_class.full_signature: public List<CmdletInfo> getByRid(long rid, long start, long offset,
        List<String> orderBy, List<Boolean> isDesc)
focal_class.identifier: getByRid
focal_class.modifiers: public
focal_class.parameters: (long rid, long start, long offset,
        List<String> orderBy, List<Boolean> isDesc)
focal_class.return: List<CmdletInfo>
focal_class.signature: List<CmdletInfo> getByRid(long rid, long start, long offset,
        List<String> orderBy, List<Boolean> isDesc)
focal_class.class_method_signature: CmdletDao.getByState(CmdletState state)
focal_class.full_signature: public List<CmdletInfo> getByState(CmdletState state)
focal_class.identifier: getByState
focal_class.modifiers: public
focal_class.parameters: (CmdletState state)
focal_class.return: List<CmdletInfo>
focal_class.signature: List<CmdletInfo> getByState(CmdletState state)
focal_class.class_method_signature: CmdletDao.getNumCmdletsInTerminiatedStates()
focal_class.full_signature: public int getNumCmdletsInTerminiatedStates()
focal_class.identifier: getNumCmdletsInTerminiatedStates
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getNumCmdletsInTerminiatedStates()
focal_class.class_method_signature: CmdletDao.getByCondition(
        String cidCondition, String ridCondition, CmdletState state)
focal_class.full_signature: public List<CmdletInfo> getByCondition(
        String cidCondition, String ridCondition, CmdletState state)
focal_class.identifier: getByCondition
focal_class.modifiers: public
focal_class.parameters: (
        String cidCondition, String ridCondition, CmdletState state)
focal_class.return: List<CmdletInfo>
focal_class.signature: List<CmdletInfo> getByCondition(
        String cidCondition, String ridCondition, CmdletState state)
focal_class.class_method_signature: CmdletDao.delete(long cid)
focal_class.full_signature: public void delete(long cid)
focal_class.identifier: delete
focal_class.modifiers: public
focal_class.parameters: (long cid)
focal_class.return: void
focal_class.signature: void delete(long cid)
focal_class.class_method_signature: CmdletDao.batchDelete(final List<Long> cids)
focal_class.full_signature: public int[] batchDelete(final List<Long> cids)
focal_class.identifier: batchDelete
focal_class.modifiers: public
focal_class.parameters: (final List<Long> cids)
focal_class.return: int[]
focal_class.signature: int[] batchDelete(final List<Long> cids)
focal_class.class_method_signature: CmdletDao.deleteBeforeTime(long timestamp)
focal_class.full_signature: public int deleteBeforeTime(long timestamp)
focal_class.identifier: deleteBeforeTime
focal_class.modifiers: public
focal_class.parameters: (long timestamp)
focal_class.return: int
focal_class.signature: int deleteBeforeTime(long timestamp)
focal_class.class_method_signature: CmdletDao.deleteKeepNewCmd(long num)
focal_class.full_signature: public int deleteKeepNewCmd(long num)
focal_class.identifier: deleteKeepNewCmd
focal_class.modifiers: public
focal_class.parameters: (long num)
focal_class.return: int
focal_class.signature: int deleteKeepNewCmd(long num)
focal_class.class_method_signature: CmdletDao.deleteAll()
focal_class.full_signature: public void deleteAll()
focal_class.identifier: deleteAll
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void deleteAll()
focal_class.class_method_signature: CmdletDao.insert(CmdletInfo cmdletInfo)
focal_class.full_signature: public void insert(CmdletInfo cmdletInfo)
focal_class.identifier: insert
focal_class.modifiers: public
focal_class.parameters: (CmdletInfo cmdletInfo)
focal_class.return: void
focal_class.signature: void insert(CmdletInfo cmdletInfo)
focal_class.class_method_signature: CmdletDao.insert(CmdletInfo[] cmdletInfos)
focal_class.full_signature: public void insert(CmdletInfo[] cmdletInfos)
focal_class.identifier: insert
focal_class.modifiers: public
focal_class.parameters: (CmdletInfo[] cmdletInfos)
focal_class.return: void
focal_class.signature: void insert(CmdletInfo[] cmdletInfos)
focal_class.class_method_signature: CmdletDao.replace(final CmdletInfo[] cmdletInfos)
focal_class.full_signature: public int[] replace(final CmdletInfo[] cmdletInfos)
focal_class.identifier: replace
focal_class.modifiers: public
focal_class.parameters: (final CmdletInfo[] cmdletInfos)
focal_class.return: int[]
focal_class.signature: int[] replace(final CmdletInfo[] cmdletInfos)
focal_class.class_method_signature: CmdletDao.update(long cid, int state)
focal_class.full_signature: public int update(long cid, int state)
focal_class.identifier: update
focal_class.modifiers: public
focal_class.parameters: (long cid, int state)
focal_class.return: int
focal_class.signature: int update(long cid, int state)
focal_class.class_method_signature: CmdletDao.update(long cid, String parameters, int state)
focal_class.full_signature: public int update(long cid, String parameters, int state)
focal_class.identifier: update
focal_class.modifiers: public
focal_class.parameters: (long cid, String parameters, int state)
focal_class.return: int
focal_class.signature: int update(long cid, String parameters, int state)
focal_class.class_method_signature: CmdletDao.update(final CmdletInfo cmdletInfo)
focal_class.full_signature: public int update(final CmdletInfo cmdletInfo)
focal_class.identifier: update
focal_class.modifiers: public
focal_class.parameters: (final CmdletInfo cmdletInfo)
focal_class.return: int
focal_class.signature: int update(final CmdletInfo cmdletInfo)
focal_class.class_method_signature: CmdletDao.update(final List<CmdletInfo> cmdletInfos)
focal_class.full_signature: public int[] update(final List<CmdletInfo> cmdletInfos)
focal_class.identifier: update
focal_class.modifiers: public
focal_class.parameters: (final List<CmdletInfo> cmdletInfos)
focal_class.return: int[]
focal_class.signature: int[] update(final List<CmdletInfo> cmdletInfos)
focal_class.class_method_signature: CmdletDao.getMaxId()
focal_class.full_signature: public long getMaxId()
focal_class.identifier: getMaxId
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getMaxId()
focal_class.class_method_signature: CmdletDao.toMap(CmdletInfo cmdletInfo)
focal_class.full_signature: private Map<String, Object> toMap(CmdletInfo cmdletInfo)
focal_class.identifier: toMap
focal_class.modifiers: private
focal_class.parameters: (CmdletInfo cmdletInfo)
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> toMap(CmdletInfo cmdletInfo)
focal_class.class_method_signature: CmdletDao.getTerminiatedStatesString()
focal_class.full_signature: private String getTerminiatedStatesString()
focal_class.identifier: getTerminiatedStatesString
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getTerminiatedStatesString()
focal_method.body: public List<CmdletInfo> getByRid(long rid) {
      JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
      return jdbcTemplate.query(
          "SELECT * FROM " + TABLE_NAME + " WHERE rid = ?",
          new Object[]{rid},
          new CmdletRowMapper());
    }
focal_method.class_method_signature: CmdletDao.getByRid(long rid)
focal_method.full_signature: public List<CmdletInfo> getByRid(long rid)
focal_method.identifier: getByRid
focal_method.invocations: query
focal_method.modifiers: public
focal_method.parameters: (long rid)
focal_method.return: List<CmdletInfo>
focal_method.signature: List<CmdletInfo> getByRid(long rid)