target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testIsSatisfiedBy() { }
@Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) || spec2.isSatisfiedBy(t); }
OrSpecification extends AbstractSpecification<T> { @Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) || spec2.isSatisfiedBy(t); } }
OrSpecification extends AbstractSpecification<T> { @Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) || spec2.isSatisfiedBy(t); } OrSpecification(final Specification<T> spec1, final Specification<T> spec2); }
OrSpecification extends AbstractSpecification<T> { @Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) || spec2.isSatisfiedBy(t); } OrSpecification(final Specification<T> spec1, final Specification<T> spec2); @Override boolean isSatisfiedBy(final T t); }
OrSpecification extends AbstractSpecification<T> { @Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) || spec2.isSatisfiedBy(t); } OrSpecification(final Specification<T> spec1, final Specification<T> spec2); @Override boolean isSatisfiedBy(final T t); }
@Test public void testJpqlQueryFindWithMapParameters() { String queryString = "select o from Dictionary o where o.category = :category"; JpqlQuery query = new JpqlQuery(repository, queryString) .addParameter("category", gender); List<Dictionary> results = repository.find(query); assertTrue(results.contains(male)); asse...
@Override public <T> List<T> find(CriteriaQuery criteriaQuery) { Query query = getEntityManager().createQuery(criteriaQuery.getQueryString()); processQuery(query, criteriaQuery.getParameters(), criteriaQuery.getFirstResult(), criteriaQuery.getMaxResults()); return query.getResultList(); }
EntityRepositoryJpa implements EntityRepository { @Override public <T> List<T> find(CriteriaQuery criteriaQuery) { Query query = getEntityManager().createQuery(criteriaQuery.getQueryString()); processQuery(query, criteriaQuery.getParameters(), criteriaQuery.getFirstResult(), criteriaQuery.getMaxResults()); return query...
EntityRepositoryJpa implements EntityRepository { @Override public <T> List<T> find(CriteriaQuery criteriaQuery) { Query query = getEntityManager().createQuery(criteriaQuery.getQueryString()); processQuery(query, criteriaQuery.getParameters(), criteriaQuery.getFirstResult(), criteriaQuery.getMaxResults()); return query...
EntityRepositoryJpa implements EntityRepository { @Override public <T> List<T> find(CriteriaQuery criteriaQuery) { Query query = getEntityManager().createQuery(criteriaQuery.getQueryString()); processQuery(query, criteriaQuery.getParameters(), criteriaQuery.getFirstResult(), criteriaQuery.getMaxResults()); return query...
EntityRepositoryJpa implements EntityRepository { @Override public <T> List<T> find(CriteriaQuery criteriaQuery) { Query query = getEntityManager().createQuery(criteriaQuery.getQueryString()); processQuery(query, criteriaQuery.getParameters(), criteriaQuery.getFirstResult(), criteriaQuery.getMaxResults()); return query...
@Test public void testIsSatisfiedByTrueTrue() { when(specification1.isSatisfiedBy(fact)).thenReturn(true); when(specification2.isSatisfiedBy(fact)).thenReturn(true); assertTrue(instance.isSatisfiedBy(fact)); }
@Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) && spec2.isSatisfiedBy(t); }
AndSpecification extends AbstractSpecification<T> { @Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) && spec2.isSatisfiedBy(t); } }
AndSpecification extends AbstractSpecification<T> { @Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) && spec2.isSatisfiedBy(t); } AndSpecification(final Specification<T> spec1, final Specification<T> spec2); }
AndSpecification extends AbstractSpecification<T> { @Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) && spec2.isSatisfiedBy(t); } AndSpecification(final Specification<T> spec1, final Specification<T> spec2); @Override boolean isSatisfiedBy(final T t); }
AndSpecification extends AbstractSpecification<T> { @Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) && spec2.isSatisfiedBy(t); } AndSpecification(final Specification<T> spec1, final Specification<T> spec2); @Override boolean isSatisfiedBy(final T t); }
@Test public void testIsSatisfiedByTrueFalse() { when(specification1.isSatisfiedBy(fact)).thenReturn(true); when(specification2.isSatisfiedBy(fact)).thenReturn(false); assertFalse(instance.isSatisfiedBy(fact)); }
@Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) && spec2.isSatisfiedBy(t); }
AndSpecification extends AbstractSpecification<T> { @Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) && spec2.isSatisfiedBy(t); } }
AndSpecification extends AbstractSpecification<T> { @Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) && spec2.isSatisfiedBy(t); } AndSpecification(final Specification<T> spec1, final Specification<T> spec2); }
AndSpecification extends AbstractSpecification<T> { @Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) && spec2.isSatisfiedBy(t); } AndSpecification(final Specification<T> spec1, final Specification<T> spec2); @Override boolean isSatisfiedBy(final T t); }
AndSpecification extends AbstractSpecification<T> { @Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) && spec2.isSatisfiedBy(t); } AndSpecification(final Specification<T> spec1, final Specification<T> spec2); @Override boolean isSatisfiedBy(final T t); }
@Test public void testIsSatisfiedByFalseTrue() { when(specification1.isSatisfiedBy(fact)).thenReturn(false); when(specification2.isSatisfiedBy(fact)).thenReturn(true); assertFalse(instance.isSatisfiedBy(fact)); }
@Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) && spec2.isSatisfiedBy(t); }
AndSpecification extends AbstractSpecification<T> { @Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) && spec2.isSatisfiedBy(t); } }
AndSpecification extends AbstractSpecification<T> { @Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) && spec2.isSatisfiedBy(t); } AndSpecification(final Specification<T> spec1, final Specification<T> spec2); }
AndSpecification extends AbstractSpecification<T> { @Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) && spec2.isSatisfiedBy(t); } AndSpecification(final Specification<T> spec1, final Specification<T> spec2); @Override boolean isSatisfiedBy(final T t); }
AndSpecification extends AbstractSpecification<T> { @Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) && spec2.isSatisfiedBy(t); } AndSpecification(final Specification<T> spec1, final Specification<T> spec2); @Override boolean isSatisfiedBy(final T t); }
@Test public void testIsSatisfiedByFalseFalse() { when(specification1.isSatisfiedBy(fact)).thenReturn(false); when(specification2.isSatisfiedBy(fact)).thenReturn(false); assertFalse(instance.isSatisfiedBy(fact)); }
@Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) && spec2.isSatisfiedBy(t); }
AndSpecification extends AbstractSpecification<T> { @Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) && spec2.isSatisfiedBy(t); } }
AndSpecification extends AbstractSpecification<T> { @Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) && spec2.isSatisfiedBy(t); } AndSpecification(final Specification<T> spec1, final Specification<T> spec2); }
AndSpecification extends AbstractSpecification<T> { @Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) && spec2.isSatisfiedBy(t); } AndSpecification(final Specification<T> spec1, final Specification<T> spec2); @Override boolean isSatisfiedBy(final T t); }
AndSpecification extends AbstractSpecification<T> { @Override public boolean isSatisfiedBy(final T t) { return spec1.isSatisfiedBy(t) && spec2.isSatisfiedBy(t); } AndSpecification(final Specification<T> spec1, final Specification<T> spec2); @Override boolean isSatisfiedBy(final T t); }
@Test public void testAnd() { assertTrue(new StartsSpecification("Ha! ") .and(new LengthSpecification(2, 20)) .isSatisfiedBy(data)); assertFalse(new StartsSpecification("Ha! ") .and(new LengthSpecification(5)) .isSatisfiedBy(data)); assertFalse(new StartsSpecification("Ha ") .and(new LengthSpecification(2, 20)) .isSati...
@Override public Specification<T> and(final Specification<T> specification) { return new AndSpecification<T>(this, specification); }
AbstractSpecification implements Specification<T> { @Override public Specification<T> and(final Specification<T> specification) { return new AndSpecification<T>(this, specification); } }
AbstractSpecification implements Specification<T> { @Override public Specification<T> and(final Specification<T> specification) { return new AndSpecification<T>(this, specification); } }
AbstractSpecification implements Specification<T> { @Override public Specification<T> and(final Specification<T> specification) { return new AndSpecification<T>(this, specification); } @Override Specification<T> and(final Specification<T> specification); @Override Specification<T> or(final Specification<T> specificati...
AbstractSpecification implements Specification<T> { @Override public Specification<T> and(final Specification<T> specification) { return new AndSpecification<T>(this, specification); } @Override Specification<T> and(final Specification<T> specification); @Override Specification<T> or(final Specification<T> specificati...
@Test public void testOr() { assertTrue(new StartsSpecification("Ha! ") .or(new LengthSpecification(5)) .isSatisfiedBy(data)); assertTrue(new StartsSpecification("Ha ") .or(new LengthSpecification(2, 20)) .isSatisfiedBy(data)); assertFalse(new StartsSpecification("Ha ") .or(new LengthSpecification(5)) .isSatisfiedBy(da...
@Override public Specification<T> or(final Specification<T> specification) { return new OrSpecification<T>(this, specification); }
AbstractSpecification implements Specification<T> { @Override public Specification<T> or(final Specification<T> specification) { return new OrSpecification<T>(this, specification); } }
AbstractSpecification implements Specification<T> { @Override public Specification<T> or(final Specification<T> specification) { return new OrSpecification<T>(this, specification); } }
AbstractSpecification implements Specification<T> { @Override public Specification<T> or(final Specification<T> specification) { return new OrSpecification<T>(this, specification); } @Override Specification<T> and(final Specification<T> specification); @Override Specification<T> or(final Specification<T> specification...
AbstractSpecification implements Specification<T> { @Override public Specification<T> or(final Specification<T> specification) { return new OrSpecification<T>(this, specification); } @Override Specification<T> and(final Specification<T> specification); @Override Specification<T> or(final Specification<T> specification...
@Test public void testNot() { Specification<String> specification = new LengthSpecification(5); assertTrue(specification.isSatisfiedBy(data)); assertFalse(specification.not().isSatisfiedBy(data)); }
@Override public Specification<T> not() { return new NotSpecification<T>(this); }
AbstractSpecification implements Specification<T> { @Override public Specification<T> not() { return new NotSpecification<T>(this); } }
AbstractSpecification implements Specification<T> { @Override public Specification<T> not() { return new NotSpecification<T>(this); } }
AbstractSpecification implements Specification<T> { @Override public Specification<T> not() { return new NotSpecification<T>(this); } @Override Specification<T> and(final Specification<T> specification); @Override Specification<T> or(final Specification<T> specification); @Override Specification<T> not(); }
AbstractSpecification implements Specification<T> { @Override public Specification<T> not() { return new NotSpecification<T>(this); } @Override Specification<T> and(final Specification<T> specification); @Override Specification<T> or(final Specification<T> specification); @Override Specification<T> not(); }
@Test public void testFromDatabaseDataSource() { final DataSource dataSource = mock(DataSource.class); assertTrue(instance.fromDatabase(dataSource) instanceof ConfigurationDbImpl); }
public WritableConfiguration fromDatabase(DataSource dataSource) { return instance.fromDatabase(dataSource); }
ConfigurationFactory { public WritableConfiguration fromDatabase(DataSource dataSource) { return instance.fromDatabase(dataSource); } }
ConfigurationFactory { public WritableConfiguration fromDatabase(DataSource dataSource) { return instance.fromDatabase(dataSource); } }
ConfigurationFactory { public WritableConfiguration fromDatabase(DataSource dataSource) { return instance.fromDatabase(dataSource); } static ConfigurationFactory singleton(); WritableConfiguration fromDatabase(DataSource dataSource); WritableConfiguration fromDatabase(DataSource dataSource, String tableName, String ke...
ConfigurationFactory { public WritableConfiguration fromDatabase(DataSource dataSource) { return instance.fromDatabase(dataSource); } static ConfigurationFactory singleton(); WritableConfiguration fromDatabase(DataSource dataSource); WritableConfiguration fromDatabase(DataSource dataSource, String tableName, String ke...
@Test public void testFromDatabaseDataSourceStringStringString() { final DataSource dataSource = mock(DataSource.class); assertTrue(instance.fromDatabase(dataSource, "table", "key", "value") instanceof ConfigurationDbImpl); }
public WritableConfiguration fromDatabase(DataSource dataSource) { return instance.fromDatabase(dataSource); }
ConfigurationFactory { public WritableConfiguration fromDatabase(DataSource dataSource) { return instance.fromDatabase(dataSource); } }
ConfigurationFactory { public WritableConfiguration fromDatabase(DataSource dataSource) { return instance.fromDatabase(dataSource); } }
ConfigurationFactory { public WritableConfiguration fromDatabase(DataSource dataSource) { return instance.fromDatabase(dataSource); } static ConfigurationFactory singleton(); WritableConfiguration fromDatabase(DataSource dataSource); WritableConfiguration fromDatabase(DataSource dataSource, String tableName, String ke...
ConfigurationFactory { public WritableConfiguration fromDatabase(DataSource dataSource) { return instance.fromDatabase(dataSource); } static ConfigurationFactory singleton(); WritableConfiguration fromDatabase(DataSource dataSource); WritableConfiguration fromDatabase(DataSource dataSource, String tableName, String ke...
@Test public void testFromClasspathString() { assertTrue(instance.fromClasspath("/conf.properties") instanceof ConfigurationInputStreamImpl); }
public Configuration fromClasspath(String fileName) { return instance.fromClasspath(fileName); }
ConfigurationFactory { public Configuration fromClasspath(String fileName) { return instance.fromClasspath(fileName); } }
ConfigurationFactory { public Configuration fromClasspath(String fileName) { return instance.fromClasspath(fileName); } }
ConfigurationFactory { public Configuration fromClasspath(String fileName) { return instance.fromClasspath(fileName); } static ConfigurationFactory singleton(); WritableConfiguration fromDatabase(DataSource dataSource); WritableConfiguration fromDatabase(DataSource dataSource, String tableName, String keyColumn, Strin...
ConfigurationFactory { public Configuration fromClasspath(String fileName) { return instance.fromClasspath(fileName); } static ConfigurationFactory singleton(); WritableConfiguration fromDatabase(DataSource dataSource); WritableConfiguration fromDatabase(DataSource dataSource, String tableName, String keyColumn, Strin...
@Test public void testJpqlQueryGetSingleResult() { String queryString = "select o from Dictionary o where o.category = :category and o.code = :code"; JpqlQuery query = new JpqlQuery(repository, queryString) .addParameter("category", gender) .addParameter("code", "01"); assertEquals(male, repository.getSingleResult(quer...
@Override public <T> T getSingleResult(CriteriaQuery criteriaQuery) { List<T> results = find(criteriaQuery); return results.isEmpty() ? null : results.get(0); }
EntityRepositoryJpa implements EntityRepository { @Override public <T> T getSingleResult(CriteriaQuery criteriaQuery) { List<T> results = find(criteriaQuery); return results.isEmpty() ? null : results.get(0); } }
EntityRepositoryJpa implements EntityRepository { @Override public <T> T getSingleResult(CriteriaQuery criteriaQuery) { List<T> results = find(criteriaQuery); return results.isEmpty() ? null : results.get(0); } EntityRepositoryJpa(); EntityRepositoryJpa(EntityManager entityManager); EntityRepositoryJpa(EntityManagerF...
EntityRepositoryJpa implements EntityRepository { @Override public <T> T getSingleResult(CriteriaQuery criteriaQuery) { List<T> results = find(criteriaQuery); return results.isEmpty() ? null : results.get(0); } EntityRepositoryJpa(); EntityRepositoryJpa(EntityManager entityManager); EntityRepositoryJpa(EntityManagerF...
EntityRepositoryJpa implements EntityRepository { @Override public <T> T getSingleResult(CriteriaQuery criteriaQuery) { List<T> results = find(criteriaQuery); return results.isEmpty() ? null : results.get(0); } EntityRepositoryJpa(); EntityRepositoryJpa(EntityManager entityManager); EntityRepositoryJpa(EntityManagerF...
@Test public void testFromFileSystemString() { String pathname = getClass().getResource("/conf.properties").getFile(); assertTrue(instance.fromFileSystem(pathname) instanceof ConfigurationFileImpl); }
public WritableConfiguration fromFileSystem(String fileName) { return instance.fromFileSystem(fileName); }
ConfigurationFactory { public WritableConfiguration fromFileSystem(String fileName) { return instance.fromFileSystem(fileName); } }
ConfigurationFactory { public WritableConfiguration fromFileSystem(String fileName) { return instance.fromFileSystem(fileName); } }
ConfigurationFactory { public WritableConfiguration fromFileSystem(String fileName) { return instance.fromFileSystem(fileName); } static ConfigurationFactory singleton(); WritableConfiguration fromDatabase(DataSource dataSource); WritableConfiguration fromDatabase(DataSource dataSource, String tableName, String keyCol...
ConfigurationFactory { public WritableConfiguration fromFileSystem(String fileName) { return instance.fromFileSystem(fileName); } static ConfigurationFactory singleton(); WritableConfiguration fromDatabase(DataSource dataSource); WritableConfiguration fromDatabase(DataSource dataSource, String tableName, String keyCol...
@Test public void testFromFileSystemStringString() { String pathname = getClass().getResource("/conf.properties").getFile(); File file = new File(pathname); String dir = file.getParent(); String fileName = file.getName(); assertTrue(instance.fromFileSystem(dir, fileName) instanceof ConfigurationFileImpl); }
public WritableConfiguration fromFileSystem(String fileName) { return instance.fromFileSystem(fileName); }
ConfigurationFactory { public WritableConfiguration fromFileSystem(String fileName) { return instance.fromFileSystem(fileName); } }
ConfigurationFactory { public WritableConfiguration fromFileSystem(String fileName) { return instance.fromFileSystem(fileName); } }
ConfigurationFactory { public WritableConfiguration fromFileSystem(String fileName) { return instance.fromFileSystem(fileName); } static ConfigurationFactory singleton(); WritableConfiguration fromDatabase(DataSource dataSource); WritableConfiguration fromDatabase(DataSource dataSource, String tableName, String keyCol...
ConfigurationFactory { public WritableConfiguration fromFileSystem(String fileName) { return instance.fromFileSystem(fileName); } static ConfigurationFactory singleton(); WritableConfiguration fromDatabase(DataSource dataSource); WritableConfiguration fromDatabase(DataSource dataSource, String tableName, String keyCol...
@Test public void testFromFileSystemFile() { String pathname = getClass().getResource("/conf.properties").getFile(); File file = new File(pathname); assertTrue(file.canRead()); assertTrue(instance.fromFileSystem(file) instanceof ConfigurationFileImpl); }
public WritableConfiguration fromFileSystem(String fileName) { return instance.fromFileSystem(fileName); }
ConfigurationFactory { public WritableConfiguration fromFileSystem(String fileName) { return instance.fromFileSystem(fileName); } }
ConfigurationFactory { public WritableConfiguration fromFileSystem(String fileName) { return instance.fromFileSystem(fileName); } }
ConfigurationFactory { public WritableConfiguration fromFileSystem(String fileName) { return instance.fromFileSystem(fileName); } static ConfigurationFactory singleton(); WritableConfiguration fromDatabase(DataSource dataSource); WritableConfiguration fromDatabase(DataSource dataSource, String tableName, String keyCol...
ConfigurationFactory { public WritableConfiguration fromFileSystem(String fileName) { return instance.fromFileSystem(fileName); } static ConfigurationFactory singleton(); WritableConfiguration fromDatabase(DataSource dataSource); WritableConfiguration fromDatabase(DataSource dataSource, String tableName, String keyCol...
@Test public void testFromUrlString() throws IOException { String pathname = getClass().getResource("/conf.properties").getFile(); final File file = new File(pathname); EmbeddedHttpServer httpServer = new EmbeddedHttpServer(1528); httpServer.mapping("/", file); httpServer.start(); String url = "http: assertTrue(instanc...
public Configuration fromUrl(String url) { return instance.fromUrl(url); }
ConfigurationFactory { public Configuration fromUrl(String url) { return instance.fromUrl(url); } }
ConfigurationFactory { public Configuration fromUrl(String url) { return instance.fromUrl(url); } }
ConfigurationFactory { public Configuration fromUrl(String url) { return instance.fromUrl(url); } static ConfigurationFactory singleton(); WritableConfiguration fromDatabase(DataSource dataSource); WritableConfiguration fromDatabase(DataSource dataSource, String tableName, String keyColumn, String valueColumn); Config...
ConfigurationFactory { public Configuration fromUrl(String url) { return instance.fromUrl(url); } static ConfigurationFactory singleton(); WritableConfiguration fromDatabase(DataSource dataSource); WritableConfiguration fromDatabase(DataSource dataSource, String tableName, String keyColumn, String valueColumn); Config...
@Test public void testFromUrlURL() throws Exception { String pathname = getClass().getResource("/conf.properties").getFile(); final File file = new File(pathname); EmbeddedHttpServer httpServer = new EmbeddedHttpServer(1528); httpServer.mapping("/", file); httpServer.start(); URL url = new URL("http: assertTrue(instanc...
public Configuration fromUrl(String url) { return instance.fromUrl(url); }
ConfigurationFactory { public Configuration fromUrl(String url) { return instance.fromUrl(url); } }
ConfigurationFactory { public Configuration fromUrl(String url) { return instance.fromUrl(url); } }
ConfigurationFactory { public Configuration fromUrl(String url) { return instance.fromUrl(url); } static ConfigurationFactory singleton(); WritableConfiguration fromDatabase(DataSource dataSource); WritableConfiguration fromDatabase(DataSource dataSource, String tableName, String keyColumn, String valueColumn); Config...
ConfigurationFactory { public Configuration fromUrl(String url) { return instance.fromUrl(url); } static ConfigurationFactory singleton(); WritableConfiguration fromDatabase(DataSource dataSource); WritableConfiguration fromDatabase(DataSource dataSource, String tableName, String keyColumn, String valueColumn); Config...
@Test public void testFromFile() { String pathname = getClass().getResource(fileInClass).getFile(); File file = new File(pathname); instance = ConfigurationFileImpl.fromFile(file); assertTrue(instance.getProperties().size() > 0); }
public static ConfigurationFileImpl fromFile(final File file) { return new ConfigurationFileImpl(file); }
ConfigurationFileImpl extends AbstractConfiguration implements WritableConfiguration { public static ConfigurationFileImpl fromFile(final File file) { return new ConfigurationFileImpl(file); } }
ConfigurationFileImpl extends AbstractConfiguration implements WritableConfiguration { public static ConfigurationFileImpl fromFile(final File file) { return new ConfigurationFileImpl(file); } ConfigurationFileImpl(final String pathname); ConfigurationFileImpl(final String dirPath, final String fileName); Configurati...
ConfigurationFileImpl extends AbstractConfiguration implements WritableConfiguration { public static ConfigurationFileImpl fromFile(final File file) { return new ConfigurationFileImpl(file); } ConfigurationFileImpl(final String pathname); ConfigurationFileImpl(final String dirPath, final String fileName); Configurati...
ConfigurationFileImpl extends AbstractConfiguration implements WritableConfiguration { public static ConfigurationFileImpl fromFile(final File file) { return new ConfigurationFileImpl(file); } ConfigurationFileImpl(final String pathname); ConfigurationFileImpl(final String dirPath, final String fileName); Configurati...
@Test public void testSave() { instance.setString("xyz", "yyyy-MM-dd"); ((ConfigurationFileImpl)instance).save(); String fileName = getClass().getResource(fileInClass).getFile(); instance = new ConfigurationFileImpl(new File(fileName)); assertEquals("yyyy-MM-dd", instance.getString("xyz")); }
@Override public void save() { BufferedWriter out = null; try { out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), PropertiesFileUtils.ISO_8859_1)); store(getProperties(), out, "Config file for " + file); } catch (Exception e) { throw new ConfigurationException(e); } finally { if (out != null) ...
ConfigurationFileImpl extends AbstractConfiguration implements WritableConfiguration { @Override public void save() { BufferedWriter out = null; try { out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), PropertiesFileUtils.ISO_8859_1)); store(getProperties(), out, "Config file for " + file); } c...
ConfigurationFileImpl extends AbstractConfiguration implements WritableConfiguration { @Override public void save() { BufferedWriter out = null; try { out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), PropertiesFileUtils.ISO_8859_1)); store(getProperties(), out, "Config file for " + file); } c...
ConfigurationFileImpl extends AbstractConfiguration implements WritableConfiguration { @Override public void save() { BufferedWriter out = null; try { out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), PropertiesFileUtils.ISO_8859_1)); store(getProperties(), out, "Config file for " + file); } c...
ConfigurationFileImpl extends AbstractConfiguration implements WritableConfiguration { @Override public void save() { BufferedWriter out = null; try { out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), PropertiesFileUtils.ISO_8859_1)); store(getProperties(), out, "Config file for " + file); } c...
@Test public void testSave() { instance.setString("xyz", "yyyy-MM-dd"); ((ConfigurationDbImpl)instance).save(); ConfigurationDbImpl instance2 = new ConfigurationDbImpl(dataSource); assertEquals("yyyy-MM-dd", instance2.getString("xyz")); }
@Override public void save() { dbUtils.save(hTable); }
ConfigurationDbImpl extends AbstractConfiguration implements WritableConfiguration { @Override public void save() { dbUtils.save(hTable); } }
ConfigurationDbImpl extends AbstractConfiguration implements WritableConfiguration { @Override public void save() { dbUtils.save(hTable); } ConfigurationDbImpl(DataSource dataSource); ConfigurationDbImpl(DataSource dataSource, String tableName, String keyColumn, String valueColumn); }
ConfigurationDbImpl extends AbstractConfiguration implements WritableConfiguration { @Override public void save() { dbUtils.save(hTable); } ConfigurationDbImpl(DataSource dataSource); ConfigurationDbImpl(DataSource dataSource, String tableName, String keyColumn, String valueColumn); @Override void load(); @Override vo...
ConfigurationDbImpl extends AbstractConfiguration implements WritableConfiguration { @Override public void save() { dbUtils.save(hTable); } ConfigurationDbImpl(DataSource dataSource); ConfigurationDbImpl(DataSource dataSource, String tableName, String keyColumn, String valueColumn); @Override void load(); @Override vo...
@Test public void testGetStringStringString() { assertEquals("yyyy-M-d", instance.getString("date.format", "yyyy-MM-dd")); assertEquals("yyyy-MM-dd", instance.getString("format", "yyyy-MM-dd")); }
@Override public String getString(String key, String defaultValue) { Assert.notBlank(key, "Key is null or empty!"); String result = getHashtable().get(key); if (result == null) { result = (String) getHashtable().get(prefix + key); } return result == null ? defaultValue : result; }
AbstractConfiguration implements Configuration { @Override public String getString(String key, String defaultValue) { Assert.notBlank(key, "Key is null or empty!"); String result = getHashtable().get(key); if (result == null) { result = (String) getHashtable().get(prefix + key); } return result == null ? defaultValue :...
AbstractConfiguration implements Configuration { @Override public String getString(String key, String defaultValue) { Assert.notBlank(key, "Key is null or empty!"); String result = getHashtable().get(key); if (result == null) { result = (String) getHashtable().get(prefix + key); } return result == null ? defaultValue :...
AbstractConfiguration implements Configuration { @Override public String getString(String key, String defaultValue) { Assert.notBlank(key, "Key is null or empty!"); String result = getHashtable().get(key); if (result == null) { result = (String) getHashtable().get(prefix + key); } return result == null ? defaultValue :...
AbstractConfiguration implements Configuration { @Override public String getString(String key, String defaultValue) { Assert.notBlank(key, "Key is null or empty!"); String result = getHashtable().get(key); if (result == null) { result = (String) getHashtable().get(prefix + key); } return result == null ? defaultValue :...
@Test public void testGetStringString() { assertEquals("yyyy-M-d", instance.getString("date.format")); assertEquals("", instance.getString("format")); assertEquals("张三", instance.getString("name")); }
@Override public String getString(String key, String defaultValue) { Assert.notBlank(key, "Key is null or empty!"); String result = getHashtable().get(key); if (result == null) { result = (String) getHashtable().get(prefix + key); } return result == null ? defaultValue : result; }
AbstractConfiguration implements Configuration { @Override public String getString(String key, String defaultValue) { Assert.notBlank(key, "Key is null or empty!"); String result = getHashtable().get(key); if (result == null) { result = (String) getHashtable().get(prefix + key); } return result == null ? defaultValue :...
AbstractConfiguration implements Configuration { @Override public String getString(String key, String defaultValue) { Assert.notBlank(key, "Key is null or empty!"); String result = getHashtable().get(key); if (result == null) { result = (String) getHashtable().get(prefix + key); } return result == null ? defaultValue :...
AbstractConfiguration implements Configuration { @Override public String getString(String key, String defaultValue) { Assert.notBlank(key, "Key is null or empty!"); String result = getHashtable().get(key); if (result == null) { result = (String) getHashtable().get(prefix + key); } return result == null ? defaultValue :...
AbstractConfiguration implements Configuration { @Override public String getString(String key, String defaultValue) { Assert.notBlank(key, "Key is null or empty!"); String result = getHashtable().get(key); if (result == null) { result = (String) getHashtable().get(prefix + key); } return result == null ? defaultValue :...
@Test public void testJpqlQueryGetSingleResultCount() { String queryString = "select count(o) from Dictionary o where o.category = :category and o.code = :code"; JpqlQuery query = new JpqlQuery(repository, queryString) .addParameter("category", gender) .addParameter("code", "01"); assertEquals(1L, repository.getSingleR...
@Override public <T> T getSingleResult(CriteriaQuery criteriaQuery) { List<T> results = find(criteriaQuery); return results.isEmpty() ? null : results.get(0); }
EntityRepositoryJpa implements EntityRepository { @Override public <T> T getSingleResult(CriteriaQuery criteriaQuery) { List<T> results = find(criteriaQuery); return results.isEmpty() ? null : results.get(0); } }
EntityRepositoryJpa implements EntityRepository { @Override public <T> T getSingleResult(CriteriaQuery criteriaQuery) { List<T> results = find(criteriaQuery); return results.isEmpty() ? null : results.get(0); } EntityRepositoryJpa(); EntityRepositoryJpa(EntityManager entityManager); EntityRepositoryJpa(EntityManagerF...
EntityRepositoryJpa implements EntityRepository { @Override public <T> T getSingleResult(CriteriaQuery criteriaQuery) { List<T> results = find(criteriaQuery); return results.isEmpty() ? null : results.get(0); } EntityRepositoryJpa(); EntityRepositoryJpa(EntityManager entityManager); EntityRepositoryJpa(EntityManagerF...
EntityRepositoryJpa implements EntityRepository { @Override public <T> T getSingleResult(CriteriaQuery criteriaQuery) { List<T> results = find(criteriaQuery); return results.isEmpty() ? null : results.get(0); } EntityRepositoryJpa(); EntityRepositoryJpa(EntityManager entityManager); EntityRepositoryJpa(EntityManagerF...
@Test public void testSetString() { instance.setString("date.format", "yyyy-MM-dd"); assertEquals("yyyy-MM-dd", instance.getString("date.format")); }
@Override public void setString(String key, String value) { Assert.notBlank(key, "Key is null or empty!"); if (StringUtils.isBlank(value)) { getHashtable().remove(key); return; } getHashtable().put(key, StringPropertyReplacer.replaceProperties(value)); }
AbstractConfiguration implements Configuration { @Override public void setString(String key, String value) { Assert.notBlank(key, "Key is null or empty!"); if (StringUtils.isBlank(value)) { getHashtable().remove(key); return; } getHashtable().put(key, StringPropertyReplacer.replaceProperties(value)); } }
AbstractConfiguration implements Configuration { @Override public void setString(String key, String value) { Assert.notBlank(key, "Key is null or empty!"); if (StringUtils.isBlank(value)) { getHashtable().remove(key); return; } getHashtable().put(key, StringPropertyReplacer.replaceProperties(value)); } }
AbstractConfiguration implements Configuration { @Override public void setString(String key, String value) { Assert.notBlank(key, "Key is null or empty!"); if (StringUtils.isBlank(value)) { getHashtable().remove(key); return; } getHashtable().put(key, StringPropertyReplacer.replaceProperties(value)); } String getDateF...
AbstractConfiguration implements Configuration { @Override public void setString(String key, String value) { Assert.notBlank(key, "Key is null or empty!"); if (StringUtils.isBlank(value)) { getHashtable().remove(key); return; } getHashtable().put(key, StringPropertyReplacer.replaceProperties(value)); } String getDateF...
@Test public void testGetIntStringInt() { assertEquals(15, instance.getInt("size", 20)); assertEquals(20, instance.getInt("size1", 20)); }
@Override public int getInt(String key, int defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Integer.parseInt(result); }
AbstractConfiguration implements Configuration { @Override public int getInt(String key, int defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Integer.parseInt(result); } }
AbstractConfiguration implements Configuration { @Override public int getInt(String key, int defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Integer.parseInt(result); } }
AbstractConfiguration implements Configuration { @Override public int getInt(String key, int defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Integer.parseInt(result); } String getDateFormat(); void setDateFormat(String dateFormat); void ...
AbstractConfiguration implements Configuration { @Override public int getInt(String key, int defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Integer.parseInt(result); } String getDateFormat(); void setDateFormat(String dateFormat); void ...
@Test public void testGetIntString() { assertEquals(15, instance.getInt("size")); assertEquals(0, instance.getInt("size1")); }
@Override public int getInt(String key, int defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Integer.parseInt(result); }
AbstractConfiguration implements Configuration { @Override public int getInt(String key, int defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Integer.parseInt(result); } }
AbstractConfiguration implements Configuration { @Override public int getInt(String key, int defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Integer.parseInt(result); } }
AbstractConfiguration implements Configuration { @Override public int getInt(String key, int defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Integer.parseInt(result); } String getDateFormat(); void setDateFormat(String dateFormat); void ...
AbstractConfiguration implements Configuration { @Override public int getInt(String key, int defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Integer.parseInt(result); } String getDateFormat(); void setDateFormat(String dateFormat); void ...
@Test public void testSetInt() { instance.setInt("size", 150); assertEquals(150, instance.getInt("size")); }
@Override public void setInt(String key, int value) { setString(key, String.valueOf(value)); }
AbstractConfiguration implements Configuration { @Override public void setInt(String key, int value) { setString(key, String.valueOf(value)); } }
AbstractConfiguration implements Configuration { @Override public void setInt(String key, int value) { setString(key, String.valueOf(value)); } }
AbstractConfiguration implements Configuration { @Override public void setInt(String key, int value) { setString(key, String.valueOf(value)); } String getDateFormat(); void setDateFormat(String dateFormat); void usePrefix(final String prefix); @Override String getString(String key, String defaultValue); @Override Stri...
AbstractConfiguration implements Configuration { @Override public void setInt(String key, int value) { setString(key, String.valueOf(value)); } String getDateFormat(); void setDateFormat(String dateFormat); void usePrefix(final String prefix); @Override String getString(String key, String defaultValue); @Override Stri...
@Test public void testGetLongStringLong() { assertEquals(15L, instance.getLong("size", 20L)); assertEquals(20L, instance.getLong("size1", 20L)); }
@Override public long getLong(String key, long defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Long.parseLong(result); }
AbstractConfiguration implements Configuration { @Override public long getLong(String key, long defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Long.parseLong(result); } }
AbstractConfiguration implements Configuration { @Override public long getLong(String key, long defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Long.parseLong(result); } }
AbstractConfiguration implements Configuration { @Override public long getLong(String key, long defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Long.parseLong(result); } String getDateFormat(); void setDateFormat(String dateFormat); void...
AbstractConfiguration implements Configuration { @Override public long getLong(String key, long defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Long.parseLong(result); } String getDateFormat(); void setDateFormat(String dateFormat); void...
@Test public void testGetLongString() { assertEquals(15L, instance.getLong("size")); assertEquals(0L, instance.getLong("size1")); }
@Override public long getLong(String key, long defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Long.parseLong(result); }
AbstractConfiguration implements Configuration { @Override public long getLong(String key, long defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Long.parseLong(result); } }
AbstractConfiguration implements Configuration { @Override public long getLong(String key, long defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Long.parseLong(result); } }
AbstractConfiguration implements Configuration { @Override public long getLong(String key, long defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Long.parseLong(result); } String getDateFormat(); void setDateFormat(String dateFormat); void...
AbstractConfiguration implements Configuration { @Override public long getLong(String key, long defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Long.parseLong(result); } String getDateFormat(); void setDateFormat(String dateFormat); void...
@Test public void testSetLong() { instance.setLong("size", 150L); assertEquals(150L, instance.getLong("size")); }
@Override public void setLong(String key, long value) { setString(key, String.valueOf(value)); }
AbstractConfiguration implements Configuration { @Override public void setLong(String key, long value) { setString(key, String.valueOf(value)); } }
AbstractConfiguration implements Configuration { @Override public void setLong(String key, long value) { setString(key, String.valueOf(value)); } }
AbstractConfiguration implements Configuration { @Override public void setLong(String key, long value) { setString(key, String.valueOf(value)); } String getDateFormat(); void setDateFormat(String dateFormat); void usePrefix(final String prefix); @Override String getString(String key, String defaultValue); @Override St...
AbstractConfiguration implements Configuration { @Override public void setLong(String key, long value) { setString(key, String.valueOf(value)); } String getDateFormat(); void setDateFormat(String dateFormat); void usePrefix(final String prefix); @Override String getString(String key, String defaultValue); @Override St...
@Test public void testGetDoubleStringDouble() { assertEquals(15D, instance.getDouble("size", 20D), 0.001); assertEquals(20D, instance.getDouble("size1", 20D), 0.001); }
@Override public double getDouble(String key, double defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Double.parseDouble(result); }
AbstractConfiguration implements Configuration { @Override public double getDouble(String key, double defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Double.parseDouble(result); } }
AbstractConfiguration implements Configuration { @Override public double getDouble(String key, double defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Double.parseDouble(result); } }
AbstractConfiguration implements Configuration { @Override public double getDouble(String key, double defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Double.parseDouble(result); } String getDateFormat(); void setDateFormat(String dateFor...
AbstractConfiguration implements Configuration { @Override public double getDouble(String key, double defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Double.parseDouble(result); } String getDateFormat(); void setDateFormat(String dateFor...
@Test public void testGetDoubleString() { assertEquals(15D, instance.getDouble("size"), 0.001); assertEquals(0D, instance.getDouble("size1"), 0.001); }
@Override public double getDouble(String key, double defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Double.parseDouble(result); }
AbstractConfiguration implements Configuration { @Override public double getDouble(String key, double defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Double.parseDouble(result); } }
AbstractConfiguration implements Configuration { @Override public double getDouble(String key, double defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Double.parseDouble(result); } }
AbstractConfiguration implements Configuration { @Override public double getDouble(String key, double defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Double.parseDouble(result); } String getDateFormat(); void setDateFormat(String dateFor...
AbstractConfiguration implements Configuration { @Override public double getDouble(String key, double defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Double.parseDouble(result); } String getDateFormat(); void setDateFormat(String dateFor...
@Test public void testSetDouble() { instance.setDouble("size", 150D); assertEquals(150D, instance.getDouble("size"), 0.001); }
@Override public void setDouble(String key, double value) { setString(key, String.valueOf(value)); }
AbstractConfiguration implements Configuration { @Override public void setDouble(String key, double value) { setString(key, String.valueOf(value)); } }
AbstractConfiguration implements Configuration { @Override public void setDouble(String key, double value) { setString(key, String.valueOf(value)); } }
AbstractConfiguration implements Configuration { @Override public void setDouble(String key, double value) { setString(key, String.valueOf(value)); } String getDateFormat(); void setDateFormat(String dateFormat); void usePrefix(final String prefix); @Override String getString(String key, String defaultValue); @Overrid...
AbstractConfiguration implements Configuration { @Override public void setDouble(String key, double value) { setString(key, String.valueOf(value)); } String getDateFormat(); void setDateFormat(String dateFormat); void usePrefix(final String prefix); @Override String getString(String key, String defaultValue); @Overrid...
@Test public void testJpqlQueryScalar() { String queryString = "select o.code, o.text from Dictionary o where o.category = :category"; JpqlQuery query = new JpqlQuery(repository, queryString) .addParameter("category", gender); List<Object[]> results = repository.find(query); }
@Override public <T> List<T> find(CriteriaQuery criteriaQuery) { Query query = getEntityManager().createQuery(criteriaQuery.getQueryString()); processQuery(query, criteriaQuery.getParameters(), criteriaQuery.getFirstResult(), criteriaQuery.getMaxResults()); return query.getResultList(); }
EntityRepositoryJpa implements EntityRepository { @Override public <T> List<T> find(CriteriaQuery criteriaQuery) { Query query = getEntityManager().createQuery(criteriaQuery.getQueryString()); processQuery(query, criteriaQuery.getParameters(), criteriaQuery.getFirstResult(), criteriaQuery.getMaxResults()); return query...
EntityRepositoryJpa implements EntityRepository { @Override public <T> List<T> find(CriteriaQuery criteriaQuery) { Query query = getEntityManager().createQuery(criteriaQuery.getQueryString()); processQuery(query, criteriaQuery.getParameters(), criteriaQuery.getFirstResult(), criteriaQuery.getMaxResults()); return query...
EntityRepositoryJpa implements EntityRepository { @Override public <T> List<T> find(CriteriaQuery criteriaQuery) { Query query = getEntityManager().createQuery(criteriaQuery.getQueryString()); processQuery(query, criteriaQuery.getParameters(), criteriaQuery.getFirstResult(), criteriaQuery.getMaxResults()); return query...
EntityRepositoryJpa implements EntityRepository { @Override public <T> List<T> find(CriteriaQuery criteriaQuery) { Query query = getEntityManager().createQuery(criteriaQuery.getQueryString()); processQuery(query, criteriaQuery.getParameters(), criteriaQuery.getFirstResult(), criteriaQuery.getMaxResults()); return query...
@Test public void testGetBooleanStringBoolean() { assertTrue(instance.getBoolean("closed", false)); assertTrue(instance.getBoolean("closed1", true)); }
@Override public boolean getBoolean(String key, boolean defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Boolean.parseBoolean(result); }
AbstractConfiguration implements Configuration { @Override public boolean getBoolean(String key, boolean defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Boolean.parseBoolean(result); } }
AbstractConfiguration implements Configuration { @Override public boolean getBoolean(String key, boolean defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Boolean.parseBoolean(result); } }
AbstractConfiguration implements Configuration { @Override public boolean getBoolean(String key, boolean defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Boolean.parseBoolean(result); } String getDateFormat(); void setDateFormat(String da...
AbstractConfiguration implements Configuration { @Override public boolean getBoolean(String key, boolean defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Boolean.parseBoolean(result); } String getDateFormat(); void setDateFormat(String da...
@Test public void testGetBooleanString() { assertTrue(instance.getBoolean("closed")); assertFalse(instance.getBoolean("closed1")); }
@Override public boolean getBoolean(String key, boolean defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Boolean.parseBoolean(result); }
AbstractConfiguration implements Configuration { @Override public boolean getBoolean(String key, boolean defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Boolean.parseBoolean(result); } }
AbstractConfiguration implements Configuration { @Override public boolean getBoolean(String key, boolean defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Boolean.parseBoolean(result); } }
AbstractConfiguration implements Configuration { @Override public boolean getBoolean(String key, boolean defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Boolean.parseBoolean(result); } String getDateFormat(); void setDateFormat(String da...
AbstractConfiguration implements Configuration { @Override public boolean getBoolean(String key, boolean defaultValue) { String result = getString(key, String.valueOf(defaultValue)); return StringUtils.isBlank(result) ? defaultValue : Boolean.parseBoolean(result); } String getDateFormat(); void setDateFormat(String da...
@Test public void testSetBoolean() { instance.setBoolean("closed", false); assertFalse(instance.getBoolean("size")); }
@Override public void setBoolean(String key, boolean value) { setString(key, String.valueOf(value)); }
AbstractConfiguration implements Configuration { @Override public void setBoolean(String key, boolean value) { setString(key, String.valueOf(value)); } }
AbstractConfiguration implements Configuration { @Override public void setBoolean(String key, boolean value) { setString(key, String.valueOf(value)); } }
AbstractConfiguration implements Configuration { @Override public void setBoolean(String key, boolean value) { setString(key, String.valueOf(value)); } String getDateFormat(); void setDateFormat(String dateFormat); void usePrefix(final String prefix); @Override String getString(String key, String defaultValue); @Overr...
AbstractConfiguration implements Configuration { @Override public void setBoolean(String key, boolean value) { setString(key, String.valueOf(value)); } String getDateFormat(); void setDateFormat(String dateFormat); void usePrefix(final String prefix); @Override String getString(String key, String defaultValue); @Overr...
@Test public void testGetDateStringDate() { Date orig = DateUtils.parseDate("2002-05-11"); Date defaultDate = DateUtils.parseDate("2008-05-11"); assertEquals(orig, instance.getDate("birthday", defaultDate)); assertEquals(defaultDate, instance.getDate("birthday1", defaultDate)); }
@Override public Date getDate(String key, Date defaultValue) { String result = getString(key); try { return StringUtils.isBlank(result) ? defaultValue : new SimpleDateFormat(dateFormat).parse(result); } catch (ParseException e) { throw new ConfigurationException("日期解析错误!日期格式是:" + dateFormat + ", 日期:" + result, e); } }
AbstractConfiguration implements Configuration { @Override public Date getDate(String key, Date defaultValue) { String result = getString(key); try { return StringUtils.isBlank(result) ? defaultValue : new SimpleDateFormat(dateFormat).parse(result); } catch (ParseException e) { throw new ConfigurationException("日期解析错误!...
AbstractConfiguration implements Configuration { @Override public Date getDate(String key, Date defaultValue) { String result = getString(key); try { return StringUtils.isBlank(result) ? defaultValue : new SimpleDateFormat(dateFormat).parse(result); } catch (ParseException e) { throw new ConfigurationException("日期解析错误!...
AbstractConfiguration implements Configuration { @Override public Date getDate(String key, Date defaultValue) { String result = getString(key); try { return StringUtils.isBlank(result) ? defaultValue : new SimpleDateFormat(dateFormat).parse(result); } catch (ParseException e) { throw new ConfigurationException("日期解析错误!...
AbstractConfiguration implements Configuration { @Override public Date getDate(String key, Date defaultValue) { String result = getString(key); try { return StringUtils.isBlank(result) ? defaultValue : new SimpleDateFormat(dateFormat).parse(result); } catch (ParseException e) { throw new ConfigurationException("日期解析错误!...
@Test public void testGetDateString() { Date orig = DateUtils.parseDate("2002-05-11"); assertEquals(orig, instance.getDate("birthday")); assertEquals(null, instance.getDate("birthday1")); }
@Override public Date getDate(String key, Date defaultValue) { String result = getString(key); try { return StringUtils.isBlank(result) ? defaultValue : new SimpleDateFormat(dateFormat).parse(result); } catch (ParseException e) { throw new ConfigurationException("日期解析错误!日期格式是:" + dateFormat + ", 日期:" + result, e); } }
AbstractConfiguration implements Configuration { @Override public Date getDate(String key, Date defaultValue) { String result = getString(key); try { return StringUtils.isBlank(result) ? defaultValue : new SimpleDateFormat(dateFormat).parse(result); } catch (ParseException e) { throw new ConfigurationException("日期解析错误!...
AbstractConfiguration implements Configuration { @Override public Date getDate(String key, Date defaultValue) { String result = getString(key); try { return StringUtils.isBlank(result) ? defaultValue : new SimpleDateFormat(dateFormat).parse(result); } catch (ParseException e) { throw new ConfigurationException("日期解析错误!...
AbstractConfiguration implements Configuration { @Override public Date getDate(String key, Date defaultValue) { String result = getString(key); try { return StringUtils.isBlank(result) ? defaultValue : new SimpleDateFormat(dateFormat).parse(result); } catch (ParseException e) { throw new ConfigurationException("日期解析错误!...
AbstractConfiguration implements Configuration { @Override public Date getDate(String key, Date defaultValue) { String result = getString(key); try { return StringUtils.isBlank(result) ? defaultValue : new SimpleDateFormat(dateFormat).parse(result); } catch (ParseException e) { throw new ConfigurationException("日期解析错误!...
@Test public void testSetDate() { Date newDate = DateUtils.parseDate("2008-05-11"); instance.setDate("birthday", newDate); assertEquals(newDate, instance.getDate("birthday")); }
@Override public void setDate(String key, Date value) { if (value == null) { setString(key, ""); } setString(key, new SimpleDateFormat(dateFormat).format(value)); }
AbstractConfiguration implements Configuration { @Override public void setDate(String key, Date value) { if (value == null) { setString(key, ""); } setString(key, new SimpleDateFormat(dateFormat).format(value)); } }
AbstractConfiguration implements Configuration { @Override public void setDate(String key, Date value) { if (value == null) { setString(key, ""); } setString(key, new SimpleDateFormat(dateFormat).format(value)); } }
AbstractConfiguration implements Configuration { @Override public void setDate(String key, Date value) { if (value == null) { setString(key, ""); } setString(key, new SimpleDateFormat(dateFormat).format(value)); } String getDateFormat(); void setDateFormat(String dateFormat); void usePrefix(final String prefix); @Over...
AbstractConfiguration implements Configuration { @Override public void setDate(String key, Date value) { if (value == null) { setString(key, ""); } setString(key, new SimpleDateFormat(dateFormat).format(value)); } String getDateFormat(); void setDateFormat(String dateFormat); void usePrefix(final String prefix); @Over...
@Test public void testGetObjectWithDefault() { Item orig = new Item(1, "abc", true); Item defaultItem = new Item(2, "xyz", false); assertEquals(orig, instance.getObject("theItem", Item.class, defaultItem)); assertEquals(defaultItem, instance.getObject("theItem1", Item.class, defaultItem)); }
@Override public <T> T getObject(String key, Class<T> objectClass, T defaultValue) { T result = serializer.deserialize(getString(key), objectClass); return result == null ? defaultValue : result; }
AbstractConfiguration implements Configuration { @Override public <T> T getObject(String key, Class<T> objectClass, T defaultValue) { T result = serializer.deserialize(getString(key), objectClass); return result == null ? defaultValue : result; } }
AbstractConfiguration implements Configuration { @Override public <T> T getObject(String key, Class<T> objectClass, T defaultValue) { T result = serializer.deserialize(getString(key), objectClass); return result == null ? defaultValue : result; } }
AbstractConfiguration implements Configuration { @Override public <T> T getObject(String key, Class<T> objectClass, T defaultValue) { T result = serializer.deserialize(getString(key), objectClass); return result == null ? defaultValue : result; } String getDateFormat(); void setDateFormat(String dateFormat); void useP...
AbstractConfiguration implements Configuration { @Override public <T> T getObject(String key, Class<T> objectClass, T defaultValue) { T result = serializer.deserialize(getString(key), objectClass); return result == null ? defaultValue : result; } String getDateFormat(); void setDateFormat(String dateFormat); void useP...
@Test public void testGetObjectWithoutDefault() { Item orig = new Item(1, "abc", true); assertEquals(orig, instance.getObject("theItem", Item.class)); assertNull(instance.getObject("theItem1", Item.class)); }
@Override public <T> T getObject(String key, Class<T> objectClass, T defaultValue) { T result = serializer.deserialize(getString(key), objectClass); return result == null ? defaultValue : result; }
AbstractConfiguration implements Configuration { @Override public <T> T getObject(String key, Class<T> objectClass, T defaultValue) { T result = serializer.deserialize(getString(key), objectClass); return result == null ? defaultValue : result; } }
AbstractConfiguration implements Configuration { @Override public <T> T getObject(String key, Class<T> objectClass, T defaultValue) { T result = serializer.deserialize(getString(key), objectClass); return result == null ? defaultValue : result; } }
AbstractConfiguration implements Configuration { @Override public <T> T getObject(String key, Class<T> objectClass, T defaultValue) { T result = serializer.deserialize(getString(key), objectClass); return result == null ? defaultValue : result; } String getDateFormat(); void setDateFormat(String dateFormat); void useP...
AbstractConfiguration implements Configuration { @Override public <T> T getObject(String key, Class<T> objectClass, T defaultValue) { T result = serializer.deserialize(getString(key), objectClass); return result == null ? defaultValue : result; } String getDateFormat(); void setDateFormat(String dateFormat); void useP...
@Test public void testSetObject() { Date newDate = DateUtils.parseDate("2008-05-11"); instance.setObject("theDay", newDate); assertEquals(newDate, instance.getObject("theDay", Date.class)); }
@Override public void setObject(String key, Object value) { setString(key, serializer.serialize(value)); }
AbstractConfiguration implements Configuration { @Override public void setObject(String key, Object value) { setString(key, serializer.serialize(value)); } }
AbstractConfiguration implements Configuration { @Override public void setObject(String key, Object value) { setString(key, serializer.serialize(value)); } }
AbstractConfiguration implements Configuration { @Override public void setObject(String key, Object value) { setString(key, serializer.serialize(value)); } String getDateFormat(); void setDateFormat(String dateFormat); void usePrefix(final String prefix); @Override String getString(String key, String defaultValue); @O...
AbstractConfiguration implements Configuration { @Override public void setObject(String key, Object value) { setString(key, serializer.serialize(value)); } String getDateFormat(); void setDateFormat(String dateFormat); void usePrefix(final String prefix); @Override String getString(String key, String defaultValue); @O...
@Test public void testGetProperties() { Properties properties = instance.getProperties(); assertEquals("15", properties.get("size")); }
@Override public Properties getProperties() { return pfu.unRectifyProperties(getHashtable()); }
AbstractConfiguration implements Configuration { @Override public Properties getProperties() { return pfu.unRectifyProperties(getHashtable()); } }
AbstractConfiguration implements Configuration { @Override public Properties getProperties() { return pfu.unRectifyProperties(getHashtable()); } }
AbstractConfiguration implements Configuration { @Override public Properties getProperties() { return pfu.unRectifyProperties(getHashtable()); } String getDateFormat(); void setDateFormat(String dateFormat); void usePrefix(final String prefix); @Override String getString(String key, String defaultValue); @Override Str...
AbstractConfiguration implements Configuration { @Override public Properties getProperties() { return pfu.unRectifyProperties(getHashtable()); } String getDateFormat(); void setDateFormat(String dateFormat); void usePrefix(final String prefix); @Override String getString(String key, String defaultValue); @Override Str...
@Test public void testCreateNamedQuery() { String queryName = "Dictionary.findByCategory"; NamedQuery query = repository.createNamedQuery(queryName); assertEquals(queryName, query.getQueryName()); }
@Override public NamedQuery createNamedQuery(String queryName) { return new NamedQuery(this, queryName); }
EntityRepositoryJpa implements EntityRepository { @Override public NamedQuery createNamedQuery(String queryName) { return new NamedQuery(this, queryName); } }
EntityRepositoryJpa implements EntityRepository { @Override public NamedQuery createNamedQuery(String queryName) { return new NamedQuery(this, queryName); } EntityRepositoryJpa(); EntityRepositoryJpa(EntityManager entityManager); EntityRepositoryJpa(EntityManagerFactory entityManagerFactory); EntityRepositoryJpa(Nam...
EntityRepositoryJpa implements EntityRepository { @Override public NamedQuery createNamedQuery(String queryName) { return new NamedQuery(this, queryName); } EntityRepositoryJpa(); EntityRepositoryJpa(EntityManager entityManager); EntityRepositoryJpa(EntityManagerFactory entityManagerFactory); EntityRepositoryJpa(Nam...
EntityRepositoryJpa implements EntityRepository { @Override public NamedQuery createNamedQuery(String queryName) { return new NamedQuery(this, queryName); } EntityRepositoryJpa(); EntityRepositoryJpa(EntityManager entityManager); EntityRepositoryJpa(EntityManagerFactory entityManagerFactory); EntityRepositoryJpa(Nam...
@Test public void testConstructorEntityManagerFactory() { EntityManagerProvider instance = new EntityManagerProvider(entityManagerFactory); EntityManager entityManager2 = instance.getEntityManager(); assertSame(entityManager2, entityManager); EntityManager entityManager3 = instance.getEntityManager(); assertSame(entity...
public EntityManager getEntityManager() { EntityManager result = entityManagerHolder.get(); if (result != null && result.isOpen()) { return result; } result = getEntityManagerFromIoC(); entityManagerHolder.set(result); return result; }
EntityManagerProvider { public EntityManager getEntityManager() { EntityManager result = entityManagerHolder.get(); if (result != null && result.isOpen()) { return result; } result = getEntityManagerFromIoC(); entityManagerHolder.set(result); return result; } }
EntityManagerProvider { public EntityManager getEntityManager() { EntityManager result = entityManagerHolder.get(); if (result != null && result.isOpen()) { return result; } result = getEntityManagerFromIoC(); entityManagerHolder.set(result); return result; } EntityManagerProvider(); EntityManagerProvider(EntityManage...
EntityManagerProvider { public EntityManager getEntityManager() { EntityManager result = entityManagerHolder.get(); if (result != null && result.isOpen()) { return result; } result = getEntityManagerFromIoC(); entityManagerHolder.set(result); return result; } EntityManagerProvider(); EntityManagerProvider(EntityManage...
EntityManagerProvider { public EntityManager getEntityManager() { EntityManager result = entityManagerHolder.get(); if (result != null && result.isOpen()) { return result; } result = getEntityManagerFromIoC(); entityManagerHolder.set(result); return result; } EntityManagerProvider(); EntityManagerProvider(EntityManage...
@Test public void testExecute() throws Exception { instance.execute(new StatefulRuleCallback() { @Override public void doInRuleSession(StatefulRuleSession session) throws Exception { session.addObject(chencao); session.addObject(xishi); session.addObject(yyang); session.executeRules(); } }); assertEquals(60, chencao.ge...
public void execute(StatefulRuleCallback callback) throws Exception { StatefulRuleSession session = getStatefulRuleSession(); try { callback.doInRuleSession(session); } finally { releaseStatefulRuleSession(session); } }
StatefulRuleTemplate { public void execute(StatefulRuleCallback callback) throws Exception { StatefulRuleSession session = getStatefulRuleSession(); try { callback.doInRuleSession(session); } finally { releaseStatefulRuleSession(session); } } }
StatefulRuleTemplate { public void execute(StatefulRuleCallback callback) throws Exception { StatefulRuleSession session = getStatefulRuleSession(); try { callback.doInRuleSession(session); } finally { releaseStatefulRuleSession(session); } } StatefulRuleTemplate(RuleServiceProvider ruleServiceProvider); StatefulRuleT...
StatefulRuleTemplate { public void execute(StatefulRuleCallback callback) throws Exception { StatefulRuleSession session = getStatefulRuleSession(); try { callback.doInRuleSession(session); } finally { releaseStatefulRuleSession(session); } } StatefulRuleTemplate(RuleServiceProvider ruleServiceProvider); StatefulRuleT...
StatefulRuleTemplate { public void execute(StatefulRuleCallback callback) throws Exception { StatefulRuleSession session = getStatefulRuleSession(); try { callback.doInRuleSession(session); } finally { releaseStatefulRuleSession(session); } } StatefulRuleTemplate(RuleServiceProvider ruleServiceProvider); StatefulRuleT...
@Test public void testExecuteRules() { instance = StatelessRuleServiceJsr94.builder() .ruleServiceProvider(new RuleServiceProviderImpl()) .serviceProviderProperties(null) .executionSetProperties(null) .ruleSource(getClass().getResourceAsStream(ruleDrl)) .sessionProperties(null) .bulid(); List results = instance.execute...
@Override public List executeRules(List facts) { try { return session.executeRules(facts); } catch (InvalidRuleSessionException e) { throw new RuleRuntimeException("Invalid Rule Session.", e); } catch (RemoteException e) { throw new IllegalStateException(e); } }
StatelessRuleServiceJsr94 implements StatelessRuleService { @Override public List executeRules(List facts) { try { return session.executeRules(facts); } catch (InvalidRuleSessionException e) { throw new RuleRuntimeException("Invalid Rule Session.", e); } catch (RemoteException e) { throw new IllegalStateException(e); }...
StatelessRuleServiceJsr94 implements StatelessRuleService { @Override public List executeRules(List facts) { try { return session.executeRules(facts); } catch (InvalidRuleSessionException e) { throw new RuleRuntimeException("Invalid Rule Session.", e); } catch (RemoteException e) { throw new IllegalStateException(e); }...
StatelessRuleServiceJsr94 implements StatelessRuleService { @Override public List executeRules(List facts) { try { return session.executeRules(facts); } catch (InvalidRuleSessionException e) { throw new RuleRuntimeException("Invalid Rule Session.", e); } catch (RemoteException e) { throw new IllegalStateException(e); }...
StatelessRuleServiceJsr94 implements StatelessRuleService { @Override public List executeRules(List facts) { try { return session.executeRules(facts); } catch (InvalidRuleSessionException e) { throw new RuleRuntimeException("Invalid Rule Session.", e); } catch (RemoteException e) { throw new IllegalStateException(e); }...
@Test public void createWithListeners() { List<EventListener> listeners = new ArrayList<EventListener>(); listeners.add(employeeRetiredEventListener); listeners.add(postCreatedEventListener); instance = new SimpleEventBus(eventStore, listeners); assertThat(instance.getListeners()).isEqualTo(listeners); }
List<EventListener> getListeners() { return listeners; }
SimpleEventBus implements EventBus { List<EventListener> getListeners() { return listeners; } }
SimpleEventBus implements EventBus { List<EventListener> getListeners() { return listeners; } SimpleEventBus(EventStore eventStore); SimpleEventBus(EventStore eventStore, List<EventListener> listeners); }
SimpleEventBus implements EventBus { List<EventListener> getListeners() { return listeners; } SimpleEventBus(EventStore eventStore); SimpleEventBus(EventStore eventStore, List<EventListener> listeners); @Override void register(EventListener... listeners); @Override void unregister(EventListener... listeners); @Overrid...
SimpleEventBus implements EventBus { List<EventListener> getListeners() { return listeners; } SimpleEventBus(EventStore eventStore); SimpleEventBus(EventStore eventStore, List<EventListener> listeners); @Override void register(EventListener... listeners); @Override void unregister(EventListener... listeners); @Overrid...
@Test public void constructor() { user = new MyUser("zhang", "123"); assertThat(user.getName(), is("zhang")); assertThat(user.getPassword(), is("123")); }
public String getPassword() { return password; }
User extends Actor implements Principal { public String getPassword() { return password; } }
User extends Actor implements Principal { public String getPassword() { return password; } User(); User(String name, String password); }
User extends Actor implements Principal { public String getPassword() { return password; } User(); User(String name, String password); String getPassword(); void setPassword(String password); String getPasswordHint(); void setPasswordHint(String passwordHint); boolean isLocked(); void setLocked(boolean locked); @Overr...
User extends Actor implements Principal { public String getPassword() { return password; } User(); User(String name, String password); String getPassword(); void setPassword(String password); String getPasswordHint(); void setPasswordHint(String passwordHint); boolean isLocked(); void setLocked(boolean locked); @Overr...
@Test public void testGet() { Cache cache = new EhCacheBasedCache("sampleCache"); cache.put("KEY1", "Koala Project"); assertTrue("Koala Project".equals(cache.get("KEY1"))); assertNull(cache.get("KEY2")); cache.remove("KEY1"); }
public Object get(String key) { Element el = (Element) cache.get(key); if (el != null) { return el.getObjectValue(); } return null; }
EhCacheBasedCache implements Cache { public Object get(String key) { Element el = (Element) cache.get(key); if (el != null) { return el.getObjectValue(); } return null; } }
EhCacheBasedCache implements Cache { public Object get(String key) { Element el = (Element) cache.get(key); if (el != null) { return el.getObjectValue(); } return null; } EhCacheBasedCache(String name); EhCacheBasedCache(EhCacheConfiguration configuration); EhCacheBasedCache(String name, int maxElementsInMemory, bool...
EhCacheBasedCache implements Cache { public Object get(String key) { Element el = (Element) cache.get(key); if (el != null) { return el.getObjectValue(); } return null; } EhCacheBasedCache(String name); EhCacheBasedCache(EhCacheConfiguration configuration); EhCacheBasedCache(String name, int maxElementsInMemory, bool...
EhCacheBasedCache implements Cache { public Object get(String key) { Element el = (Element) cache.get(key); if (el != null) { return el.getObjectValue(); } return null; } EhCacheBasedCache(String name); EhCacheBasedCache(EhCacheConfiguration configuration); EhCacheBasedCache(String name, int maxElementsInMemory, bool...
@Test public void get() { Object obj = cache.get("hehe"); assertNull(obj); }
public Object get(String key) { init(); Object obj = mcc.get(key); debug("命中缓存:{},key:{}", new Object[] { (obj != null), key }); return obj; }
MemcachedBasedCache implements Cache { public Object get(String key) { init(); Object obj = mcc.get(key); debug("命中缓存:{},key:{}", new Object[] { (obj != null), key }); return obj; } }
MemcachedBasedCache implements Cache { public Object get(String key) { init(); Object obj = mcc.get(key); debug("命中缓存:{},key:{}", new Object[] { (obj != null), key }); return obj; } }
MemcachedBasedCache implements Cache { public Object get(String key) { init(); Object obj = mcc.get(key); debug("命中缓存:{},key:{}", new Object[] { (obj != null), key }); return obj; } Object get(String key); @Override Map<String, Object> get(String... keys); boolean containsKey(String key); void put(String key, Object v...
MemcachedBasedCache implements Cache { public Object get(String key) { init(); Object obj = mcc.get(key); debug("命中缓存:{},key:{}", new Object[] { (obj != null), key }); return obj; } Object get(String key); @Override Map<String, Object> get(String... keys); boolean containsKey(String key); void put(String key, Object v...
@Test public void put() throws InterruptedException { try { Thread.sleep(1000); Date now = new Date(); cache.put("time", now); Date obj = (Date) cache.get("time"); assertNotNull(obj); assertEquals(now, obj); } catch (RuntimeException ex) { System.err.println("出错了..." + ex); throw ex; } }
public void put(String key, Object value) { init(); mcc.set(key, value); debug("缓存数据,key:{}", key); }
MemcachedBasedCache implements Cache { public void put(String key, Object value) { init(); mcc.set(key, value); debug("缓存数据,key:{}", key); } }
MemcachedBasedCache implements Cache { public void put(String key, Object value) { init(); mcc.set(key, value); debug("缓存数据,key:{}", key); } }
MemcachedBasedCache implements Cache { public void put(String key, Object value) { init(); mcc.set(key, value); debug("缓存数据,key:{}", key); } Object get(String key); @Override Map<String, Object> get(String... keys); boolean containsKey(String key); void put(String key, Object value); void put(String key, Object value,...
MemcachedBasedCache implements Cache { public void put(String key, Object value) { init(); mcc.set(key, value); debug("缓存数据,key:{}", key); } Object get(String key); @Override Map<String, Object> get(String... keys); boolean containsKey(String key); void put(String key, Object value); void put(String key, Object value,...
@Test public void remove() { assertFalse(cache.remove("no-exist")); Date now = new Date(); cache.put("time", now); boolean delete = cache.remove("time"); assertTrue(delete); }
public boolean remove(String key) { init(); boolean result = mcc.delete(key); debug("删除缓存,key:{}", key); return result; }
MemcachedBasedCache implements Cache { public boolean remove(String key) { init(); boolean result = mcc.delete(key); debug("删除缓存,key:{}", key); return result; } }
MemcachedBasedCache implements Cache { public boolean remove(String key) { init(); boolean result = mcc.delete(key); debug("删除缓存,key:{}", key); return result; } }
MemcachedBasedCache implements Cache { public boolean remove(String key) { init(); boolean result = mcc.delete(key); debug("删除缓存,key:{}", key); return result; } Object get(String key); @Override Map<String, Object> get(String... keys); boolean containsKey(String key); void put(String key, Object value); void put(Strin...
MemcachedBasedCache implements Cache { public boolean remove(String key) { init(); boolean result = mcc.delete(key); debug("删除缓存,key:{}", key); return result; } Object get(String key); @Override Map<String, Object> get(String... keys); boolean containsKey(String key); void put(String key, Object value); void put(Strin...
@Test(expected = IllegalArgumentException.class) public void testIsTrueWithMessageFailure() { Assert.isTrue(false, "Failure!"); }
public static void isTrue(boolean expression, String message) { if (!expression) { throw new IllegalArgumentException(message); } }
Assert { public static void isTrue(boolean expression, String message) { if (!expression) { throw new IllegalArgumentException(message); } } }
Assert { public static void isTrue(boolean expression, String message) { if (!expression) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isTrue(boolean expression, String message) { if (!expression) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static ...
Assert { public static void isTrue(boolean expression, String message) { if (!expression) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static ...
@Test() public void testIsTrueWithMessageSuccess() { Assert.isTrue(3 > 2, "Failure!"); }
public static void isTrue(boolean expression, String message) { if (!expression) { throw new IllegalArgumentException(message); } }
Assert { public static void isTrue(boolean expression, String message) { if (!expression) { throw new IllegalArgumentException(message); } } }
Assert { public static void isTrue(boolean expression, String message) { if (!expression) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isTrue(boolean expression, String message) { if (!expression) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static ...
Assert { public static void isTrue(boolean expression, String message) { if (!expression) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static ...
@Test public void testNamedQueryFindWithArrayParameters() { NamedQuery query = new NamedQuery(repository, "Dictionay.findByCategoryArrayParams") .setParameters(gender); List<Dictionary> results = repository.find(query); assertTrue(results.contains(male)); assertFalse(results.contains(undergraduate)); }
@Override public <T> List<T> find(CriteriaQuery criteriaQuery) { Query query = getEntityManager().createQuery(criteriaQuery.getQueryString()); processQuery(query, criteriaQuery.getParameters(), criteriaQuery.getFirstResult(), criteriaQuery.getMaxResults()); return query.getResultList(); }
EntityRepositoryJpa implements EntityRepository { @Override public <T> List<T> find(CriteriaQuery criteriaQuery) { Query query = getEntityManager().createQuery(criteriaQuery.getQueryString()); processQuery(query, criteriaQuery.getParameters(), criteriaQuery.getFirstResult(), criteriaQuery.getMaxResults()); return query...
EntityRepositoryJpa implements EntityRepository { @Override public <T> List<T> find(CriteriaQuery criteriaQuery) { Query query = getEntityManager().createQuery(criteriaQuery.getQueryString()); processQuery(query, criteriaQuery.getParameters(), criteriaQuery.getFirstResult(), criteriaQuery.getMaxResults()); return query...
EntityRepositoryJpa implements EntityRepository { @Override public <T> List<T> find(CriteriaQuery criteriaQuery) { Query query = getEntityManager().createQuery(criteriaQuery.getQueryString()); processQuery(query, criteriaQuery.getParameters(), criteriaQuery.getFirstResult(), criteriaQuery.getMaxResults()); return query...
EntityRepositoryJpa implements EntityRepository { @Override public <T> List<T> find(CriteriaQuery criteriaQuery) { Query query = getEntityManager().createQuery(criteriaQuery.getQueryString()); processQuery(query, criteriaQuery.getParameters(), criteriaQuery.getFirstResult(), criteriaQuery.getMaxResults()); return query...
@Test(expected = IllegalArgumentException.class) public void testIsTrueFailure() { Assert.isTrue(false); }
public static void isTrue(boolean expression, String message) { if (!expression) { throw new IllegalArgumentException(message); } }
Assert { public static void isTrue(boolean expression, String message) { if (!expression) { throw new IllegalArgumentException(message); } } }
Assert { public static void isTrue(boolean expression, String message) { if (!expression) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isTrue(boolean expression, String message) { if (!expression) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static ...
Assert { public static void isTrue(boolean expression, String message) { if (!expression) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static ...
@Test() public void testIsTrueSuccess() { Assert.isTrue(3 > 2); }
public static void isTrue(boolean expression, String message) { if (!expression) { throw new IllegalArgumentException(message); } }
Assert { public static void isTrue(boolean expression, String message) { if (!expression) { throw new IllegalArgumentException(message); } } }
Assert { public static void isTrue(boolean expression, String message) { if (!expression) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isTrue(boolean expression, String message) { if (!expression) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static ...
Assert { public static void isTrue(boolean expression, String message) { if (!expression) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static ...
@Test(expected = IllegalArgumentException.class) public void testIsFalseWithMessageFailure() { Assert.isFalse(true, "Failure!"); }
public static void isFalse(boolean expression, String message) { if (expression) { throw new IllegalArgumentException(message); } }
Assert { public static void isFalse(boolean expression, String message) { if (expression) { throw new IllegalArgumentException(message); } } }
Assert { public static void isFalse(boolean expression, String message) { if (expression) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isFalse(boolean expression, String message) { if (expression) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static ...
Assert { public static void isFalse(boolean expression, String message) { if (expression) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static ...
@Test() public void testIsFalseWithMessageSuccess() { Assert.isFalse(3 < 2, "Failure!"); }
public static void isFalse(boolean expression, String message) { if (expression) { throw new IllegalArgumentException(message); } }
Assert { public static void isFalse(boolean expression, String message) { if (expression) { throw new IllegalArgumentException(message); } } }
Assert { public static void isFalse(boolean expression, String message) { if (expression) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isFalse(boolean expression, String message) { if (expression) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static ...
Assert { public static void isFalse(boolean expression, String message) { if (expression) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static ...
@Test(expected = IllegalArgumentException.class) public void testIsFalseFailure() { Assert.isFalse(true); }
public static void isFalse(boolean expression, String message) { if (expression) { throw new IllegalArgumentException(message); } }
Assert { public static void isFalse(boolean expression, String message) { if (expression) { throw new IllegalArgumentException(message); } } }
Assert { public static void isFalse(boolean expression, String message) { if (expression) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isFalse(boolean expression, String message) { if (expression) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static ...
Assert { public static void isFalse(boolean expression, String message) { if (expression) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static ...
@Test() public void testIsFalseSuccess() { Assert.isFalse(3 < 2); }
public static void isFalse(boolean expression, String message) { if (expression) { throw new IllegalArgumentException(message); } }
Assert { public static void isFalse(boolean expression, String message) { if (expression) { throw new IllegalArgumentException(message); } } }
Assert { public static void isFalse(boolean expression, String message) { if (expression) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isFalse(boolean expression, String message) { if (expression) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static ...
Assert { public static void isFalse(boolean expression, String message) { if (expression) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static ...
@Test(expected = IllegalArgumentException.class) public void testIsNullWithMessageFailure() { Assert.isNull("Hi", "Failure!"); }
public static void isNull(Object object, String message) { if (object != null) { throw new IllegalArgumentException(message); } }
Assert { public static void isNull(Object object, String message) { if (object != null) { throw new IllegalArgumentException(message); } } }
Assert { public static void isNull(Object object, String message) { if (object != null) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isNull(Object object, String message) { if (object != null) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static vo...
Assert { public static void isNull(Object object, String message) { if (object != null) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static vo...
@Test() public void testIsNullWithMessageSuccess() { Assert.isNull(null, "Failure!"); }
public static void isNull(Object object, String message) { if (object != null) { throw new IllegalArgumentException(message); } }
Assert { public static void isNull(Object object, String message) { if (object != null) { throw new IllegalArgumentException(message); } } }
Assert { public static void isNull(Object object, String message) { if (object != null) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isNull(Object object, String message) { if (object != null) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static vo...
Assert { public static void isNull(Object object, String message) { if (object != null) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static vo...
@Test(expected = IllegalArgumentException.class) public void testIsNullFailure() { Assert.isNull("Hi"); }
public static void isNull(Object object, String message) { if (object != null) { throw new IllegalArgumentException(message); } }
Assert { public static void isNull(Object object, String message) { if (object != null) { throw new IllegalArgumentException(message); } } }
Assert { public static void isNull(Object object, String message) { if (object != null) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isNull(Object object, String message) { if (object != null) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static vo...
Assert { public static void isNull(Object object, String message) { if (object != null) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static vo...
@Test() public void testIsNullSuccess() { Assert.isNull(null); }
public static void isNull(Object object, String message) { if (object != null) { throw new IllegalArgumentException(message); } }
Assert { public static void isNull(Object object, String message) { if (object != null) { throw new IllegalArgumentException(message); } } }
Assert { public static void isNull(Object object, String message) { if (object != null) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isNull(Object object, String message) { if (object != null) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static vo...
Assert { public static void isNull(Object object, String message) { if (object != null) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static vo...
@Test public void testNamedQueryFindWithMapParameters() { NamedQuery query = new NamedQuery(repository, "Dictionay.findByCategory") .addParameter("category", gender); List<Dictionary> results = repository.find(query); assertTrue(results.contains(male)); assertFalse(results.contains(undergraduate)); }
@Override public <T> List<T> find(CriteriaQuery criteriaQuery) { Query query = getEntityManager().createQuery(criteriaQuery.getQueryString()); processQuery(query, criteriaQuery.getParameters(), criteriaQuery.getFirstResult(), criteriaQuery.getMaxResults()); return query.getResultList(); }
EntityRepositoryJpa implements EntityRepository { @Override public <T> List<T> find(CriteriaQuery criteriaQuery) { Query query = getEntityManager().createQuery(criteriaQuery.getQueryString()); processQuery(query, criteriaQuery.getParameters(), criteriaQuery.getFirstResult(), criteriaQuery.getMaxResults()); return query...
EntityRepositoryJpa implements EntityRepository { @Override public <T> List<T> find(CriteriaQuery criteriaQuery) { Query query = getEntityManager().createQuery(criteriaQuery.getQueryString()); processQuery(query, criteriaQuery.getParameters(), criteriaQuery.getFirstResult(), criteriaQuery.getMaxResults()); return query...
EntityRepositoryJpa implements EntityRepository { @Override public <T> List<T> find(CriteriaQuery criteriaQuery) { Query query = getEntityManager().createQuery(criteriaQuery.getQueryString()); processQuery(query, criteriaQuery.getParameters(), criteriaQuery.getFirstResult(), criteriaQuery.getMaxResults()); return query...
EntityRepositoryJpa implements EntityRepository { @Override public <T> List<T> find(CriteriaQuery criteriaQuery) { Query query = getEntityManager().createQuery(criteriaQuery.getQueryString()); processQuery(query, criteriaQuery.getParameters(), criteriaQuery.getFirstResult(), criteriaQuery.getMaxResults()); return query...
@Test(expected = IllegalArgumentException.class) public void testNotNullWithMessageFailure() { Assert.notNull(null, "Failure!"); }
public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } }
Assert { public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } } }
Assert { public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static v...
Assert { public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static v...
@Test() public void testNotNullWithMessageSuccess() { Assert.notNull("Hi", "Failure!"); }
public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } }
Assert { public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } } }
Assert { public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static v...
Assert { public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static v...
@Test(expected = IllegalArgumentException.class) public void testNotNullFailure() { Assert.notNull(null); }
public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } }
Assert { public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } } }
Assert { public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static v...
Assert { public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static v...
@Test() public void testNotNullSuccess() { Assert.notNull("Hi"); }
public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } }
Assert { public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } } }
Assert { public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static v...
Assert { public static void notNull(Object object, String message) { if (object == null) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String message); static v...
@Test(expected = IllegalArgumentException.class) public void testIsEmptyStringWithMessageFailure() { Assert.isEmpty("Hi", "Failure!"); }
public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
@Test() public void testIsEmptyStringWithMessageSuccess() { Assert.isEmpty((String) null, "Failure!"); Assert.isEmpty("", "Failure!"); }
public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
@Test(expected = IllegalArgumentException.class) public void testIsEmptyStringFailure() { Assert.isEmpty("Hi"); }
public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
@Test() public void testIsEmptyStringSuccess() { Assert.isEmpty((String) null); }
public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
@Test(expected = IllegalArgumentException.class) public void testNotEmptyStringWithMessageFailure() { Assert.notEmpty((String) null, "Failure!"); }
public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
@Test(expected = IllegalArgumentException.class) public void testNotEmptyStringWithMessageFailure1() { Assert.notEmpty("", "Failure!"); }
public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
@Test public void testNamedQueryGetSingleResult() { NamedQuery query = new NamedQuery(repository, "Dictionay.findByCategoryAndCode") .setParameters(gender, "01"); assertEquals(male, repository.getSingleResult(query)); }
@Override public <T> T getSingleResult(CriteriaQuery criteriaQuery) { List<T> results = find(criteriaQuery); return results.isEmpty() ? null : results.get(0); }
EntityRepositoryJpa implements EntityRepository { @Override public <T> T getSingleResult(CriteriaQuery criteriaQuery) { List<T> results = find(criteriaQuery); return results.isEmpty() ? null : results.get(0); } }
EntityRepositoryJpa implements EntityRepository { @Override public <T> T getSingleResult(CriteriaQuery criteriaQuery) { List<T> results = find(criteriaQuery); return results.isEmpty() ? null : results.get(0); } EntityRepositoryJpa(); EntityRepositoryJpa(EntityManager entityManager); EntityRepositoryJpa(EntityManagerF...
EntityRepositoryJpa implements EntityRepository { @Override public <T> T getSingleResult(CriteriaQuery criteriaQuery) { List<T> results = find(criteriaQuery); return results.isEmpty() ? null : results.get(0); } EntityRepositoryJpa(); EntityRepositoryJpa(EntityManager entityManager); EntityRepositoryJpa(EntityManagerF...
EntityRepositoryJpa implements EntityRepository { @Override public <T> T getSingleResult(CriteriaQuery criteriaQuery) { List<T> results = find(criteriaQuery); return results.isEmpty() ? null : results.get(0); } EntityRepositoryJpa(); EntityRepositoryJpa(EntityManager entityManager); EntityRepositoryJpa(EntityManagerF...
@Test() public void testNotEmptyStringWithMessageSuccess() { Assert.notEmpty("Hi", "Failure!"); }
public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
@Test(expected = IllegalArgumentException.class) public void testNotEmptyStringFailure() { Assert.notEmpty((String) null); }
public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
@Test(expected = IllegalArgumentException.class) public void testNotEmptyStringFailure1() { Assert.notEmpty(""); }
public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
@Test() public void testNotEmptyStringSuccess() { Assert.notEmpty("Hi"); }
public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
@Test(expected = IllegalArgumentException.class) public void testIsEmptyArrayWithMessageFailure() { Assert.isEmpty(new String[] {"abc"}, "Failure!"); }
public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
@Test() public void testIsEmptyArrayWithMessageSuccess() { String[] array = null; Assert.isEmpty(array, "Failure!"); Assert.isEmpty(new String[] {}, "Failure!"); }
public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
@Test(expected = IllegalArgumentException.class) public void testIsEmptyArrayFailure() { Assert.isEmpty(new String[] {"abc"}); }
public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
@Test() public void testIsEmptyArraySuccess() { Assert.isEmpty((Object[]) null); }
public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
@Test(expected = IllegalArgumentException.class) public void testNotEmptyArrayWithMessageFailure() { String[] array = null; Assert.notEmpty(array, "Failure!"); }
public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
@Test(expected = IllegalArgumentException.class) public void testNotEmptyArrayWithMessageFailure1() { Assert.notEmpty(new String[] {}, "Failure!"); }
public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
@Test public void testNamedQueryGetSingleResultCount() { String queryName = "DictionaryCategory.getCount"; NamedQuery query = new NamedQuery(repository, queryName) .addParameter("name", "gender"); assertEquals(1L, repository.getSingleResult(query)); }
@Override public <T> T getSingleResult(CriteriaQuery criteriaQuery) { List<T> results = find(criteriaQuery); return results.isEmpty() ? null : results.get(0); }
EntityRepositoryJpa implements EntityRepository { @Override public <T> T getSingleResult(CriteriaQuery criteriaQuery) { List<T> results = find(criteriaQuery); return results.isEmpty() ? null : results.get(0); } }
EntityRepositoryJpa implements EntityRepository { @Override public <T> T getSingleResult(CriteriaQuery criteriaQuery) { List<T> results = find(criteriaQuery); return results.isEmpty() ? null : results.get(0); } EntityRepositoryJpa(); EntityRepositoryJpa(EntityManager entityManager); EntityRepositoryJpa(EntityManagerF...
EntityRepositoryJpa implements EntityRepository { @Override public <T> T getSingleResult(CriteriaQuery criteriaQuery) { List<T> results = find(criteriaQuery); return results.isEmpty() ? null : results.get(0); } EntityRepositoryJpa(); EntityRepositoryJpa(EntityManager entityManager); EntityRepositoryJpa(EntityManagerF...
EntityRepositoryJpa implements EntityRepository { @Override public <T> T getSingleResult(CriteriaQuery criteriaQuery) { List<T> results = find(criteriaQuery); return results.isEmpty() ? null : results.get(0); } EntityRepositoryJpa(); EntityRepositoryJpa(EntityManager entityManager); EntityRepositoryJpa(EntityManagerF...
@Test() public void testNotEmptyArrayWithMessageSuccess() { Assert.notEmpty(new String[] {"abc"}, "Failure!"); }
public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
@Test(expected = IllegalArgumentException.class) public void testNotEmptyArrayFailure() { String[] array = null; Assert.notEmpty(array); }
public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
@Test(expected = IllegalArgumentException.class) public void testNotEmptyArrayFailure1() { Assert.notEmpty(new String[] {}); }
public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
@Test() public void testNotEmptyArraySuccess() { Assert.notEmpty(new String[] {"abc"}); }
public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
@Test(expected = IllegalArgumentException.class) public void testIsEmptyCollectionWithMessageFailure() { Assert.isEmpty(Collections.singleton("abc"), "Failure!"); }
public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
@Test() public void testIsEmptyCollectionWithMessageSuccess() { List list = null; Assert.isEmpty(list, "Failure!"); Assert.isEmpty(Collections.EMPTY_LIST, "Failure!"); }
public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
@Test(expected = IllegalArgumentException.class) public void testIsEmptyCollectionFailure() { Assert.isEmpty(Collections.singleton("abc")); }
public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
@Test() public void testIsEmptyCollectionSuccess() { Assert.isEmpty((List) null); }
public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
Assert { public static void isEmpty(CharSequence text, String message) { if (StringUtils.isNotEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String ...
@Test(expected = IllegalArgumentException.class) public void testNotEmptyCollectionWithMessageFailure() { List list = null; Assert.notEmpty(list, "Failure!"); }
public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); }
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...
Assert { public static void notEmpty(CharSequence text, String message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(message); } } private Assert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression); static void isFalse(boolean expression, String me...