@Override public String internalVal() { return internalState.val2().get(); } }
@Override public File cacheDirectory() { return data.cache().get(); }
public static Property<Integer> sub( Property<Integer> property, int amount ) { property.set( property.get() - amount ); return property; }
public static Property<Integer> div( Property<Integer> property, int amount ) { property.set( property.get() / amount ); return property; }
public static Property<Long> sub( Property<Long> property, long amount ) { property.set( property.get() - amount ); return property; }
@Override public Currency amount() { return state.amount().get(); } }
public static Property<Long> div( Property<Long> property, long amount ) { property.set( property.get() / amount ); return property; }
public static Property<Double> div( Property<Double> property, double amount ) { property.set( property.get() / amount ); return property; }
public static Property<Float> sub( Property<Float> property, float amount ) { property.set( property.get() - amount ); return property; }
public static Property<Float> div( Property<Float> property, float amount ) { property.set( property.get() / amount ); return property; }
public static Property<BigDecimal> add( Property<BigDecimal> property, BigDecimal amount ) { property.set( property.get().add( amount ) ); return property; }
private Properties getProperties() { JdbmEntityStoreConfiguration config = this.config.get(); Properties properties = new Properties(); properties.put( RecordManagerOptions.AUTO_COMMIT, config.autoCommit().get().toString() ); properties.put( RecordManagerOptions.DISABLE_TRANSACTIONS, config.disableTransactions().get().toString() ); return properties; }
public static void verifyOrderedResults( final Iterable<? extends Nameable> results, final String... names ) { List<String> expected = new ArrayList<>( Arrays.asList( names ) ); List<String> actual = new ArrayList<>(); for( Nameable result : results ) { actual.add( result.name().get() ); } assertThat( "Result is incorrect", actual, equalTo( expected ) ); }
@Override public String name() { return config.get().name().get(); } }
@Test public void script24() { final Query<Domain> query = unitOfWork.newQuery( this.moduleInstance .newQueryBuilder( Domain.class ) .where( queries.get( "script24" ) ) ); query.setVariable( "domain", "Gaming" ); System.out.println( "*** script24: " + query ); assertThat( query.find().name().get(), is( equalTo( "Gaming" ) ) ); } }
@Test public void script32() { QueryBuilder<Person> qb = this.moduleInstance.newQueryBuilder( Person.class ); Person person = templateFor( Person.class ); Query<Person> query = unitOfWork.newQuery( qb.where( eq( person.address().get().line1(), "Qi Alley 4j" ) ) ); System.out.println( "*** script32: " + query ); verifyUnorderedResults( query, "Joe Doe" ); }
public SecureJettyMixin( @This HasIdentity meAsIdentity, @Service Server jettyServer, @Service Iterable<ServiceReference<ServletContextListener>> contextListeners, @Service Iterable<ServiceReference<Servlet>> servlets, @Service Iterable<ServiceReference<Filter>> filters, @Optional @Service MBeanServer mBeanServer ) { super( meAsIdentity.identity().get(), jettyServer, contextListeners, servlets, filters, mBeanServer ); }