当前位置: 首页>>代码示例>>Java>>正文


Java Where类代码示例

本文整理汇总了Java中org.apache.isis.applib.annotation.Where的典型用法代码示例。如果您正苦于以下问题:Java Where类的具体用法?Java Where怎么用?Java Where使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Where类属于org.apache.isis.applib.annotation包,在下文中一共展示了Where类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: validarModificarFechaVigencia

import org.apache.isis.applib.annotation.Where; //导入依赖的package包/类
@ActionLayout(hidden = Where.EVERYWHERE)
public boolean validarModificarFechaVigencia(Vehiculo vehiculo, Date fechaVigencia,
		PolizaAutomotor riesgoAutomotor) {

	boolean validador = true;

	List<PolizaAutomotor> listaPolizas = riesgoAutomotoresRepository.listarPorEstado(Estado.vigente);
	listaPolizas.addAll(riesgoAutomotoresRepository.listarPorEstado(Estado.previgente));

	for (PolizaAutomotor r : listaPolizas) {
		if (r != riesgoAutomotor) {
			for (Vehiculo v : r.getRiesgoAutomotorListaVehiculos()) {
				if (vehiculo.equals(v)) {
					if ((fechaVigencia.before(r.getPolizaFechaVencimiento()))
							& (this.getPolizaFechaVencimiento().after(r.getPolizaFechaVigencia()))) {
						validador = false;
					}
				}
			}
		}
	}

	return validador;
}
 
开发者ID:leandrogonqn,项目名称:Proyecto2017Seguros,代码行数:25,代码来源:PolizaAutomotor.java

示例2: validarModificarFechaVencimiento

import org.apache.isis.applib.annotation.Where; //导入依赖的package包/类
@ActionLayout(hidden = Where.EVERYWHERE)
public boolean validarModificarFechaVencimiento(Vehiculo vehiculo, Date fechaVencimiento,
		PolizaAutomotor riesgoAutomotor) {

	boolean validador = true;

	List<PolizaAutomotor> listaPolizas = riesgoAutomotoresRepository.listarPorEstado(Estado.vigente);
	listaPolizas.addAll(riesgoAutomotoresRepository.listarPorEstado(Estado.previgente));

	for (PolizaAutomotor r : listaPolizas) {
		if (r != riesgoAutomotor) {
			for (Vehiculo v : r.getRiesgoAutomotorListaVehiculos()) {
				if (vehiculo.equals(v)) {
					if ((fechaVencimiento.after(r.getPolizaFechaVigencia()))
							& (this.getPolizaFechaVigencia().before(r.getPolizaFechaVencimiento()))) {
						validador = false;
					}
				}
			}
		}
	}

	return validador;
}
 
开发者ID:leandrogonqn,项目名称:Proyecto2017Seguros,代码行数:25,代码来源:PolizaAutomotor.java

示例3: cardCheck

import org.apache.isis.applib.annotation.Where; //导入依赖的package包/类
@POST
@Path("/card-check")
@Consumes({ MediaType.APPLICATION_JSON, MediaType.WILDCARD })
@Produces({
        MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_OBJECT, RestfulMediaType.APPLICATION_JSON_ERROR,
        MediaType.APPLICATION_XML, RestfulMediaType.APPLICATION_XML_OBJECT, RestfulMediaType.APPLICATION_XML_ERROR
})
@PrettyPrinting
public Response cardCheck(
        @FormParam("device") String deviceName,
        @FormParam("key") String deviceSecret,
        @FormParam("request") String request
) {
    init(RepresentationType.DOMAIN_OBJECT, Where.OBJECT_FORMS, RepresentationService.Intent.ALREADY_PERSISTENT);

    CardCheckRequestViewModel requestViewModel = gson.fromJson(request, CardCheckRequestViewModel.class);

    return apiService.cardCheck(
            deviceName,
            deviceSecret,
            requestViewModel.getCardNumber(),
            requestViewModel.getOrigin()
    ).asResponse();
}
 
开发者ID:incodehq,项目名称:ecpcrm,代码行数:25,代码来源:EcpCrmResource.java

示例4: cardGame

import org.apache.isis.applib.annotation.Where; //导入依赖的package包/类
@POST
@Path("/card-game")
@Consumes({ MediaType.APPLICATION_JSON, MediaType.WILDCARD })
@Produces({
        MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_OBJECT, RestfulMediaType.APPLICATION_JSON_ERROR,
        MediaType.APPLICATION_XML, RestfulMediaType.APPLICATION_XML_OBJECT, RestfulMediaType.APPLICATION_XML_ERROR
})
@PrettyPrinting
public Response cardGame(
        @FormParam("device") String deviceName,
        @FormParam("key") String deviceSecret,
        @FormParam("request") String request
) {
    init(RepresentationType.DOMAIN_OBJECT, Where.OBJECT_FORMS, RepresentationService.Intent.ALREADY_PERSISTENT);

    CardGameRequestViewModel requestViewModel = gson.fromJson(request, CardGameRequestViewModel.class);

    return apiService.cardGame(
            deviceName,
            deviceSecret,
            requestViewModel.getCardNumber(),
            requestViewModel.getWin(),
            requestViewModel.getDesc()
    ).asResponse();
}
 
开发者ID:incodehq,项目名称:ecpcrm,代码行数:26,代码来源:EcpCrmResource.java

示例5: crearReserva

import org.apache.isis.applib.annotation.Where; //导入依赖的package包/类
/**
 * Crea uan nueva Reserva
 * @param _comensales int
 * @param _mesa Mesa
 * @param _fecha Date
 * @param _hora String
 * @return nuevaReserva() Reserva
 */
@Named("Crear")
@Hidden(where = Where.OBJECT_FORMS)
public Reserva crearReserva(@Named("Comensales") final int _comensales,
		@Named("Mesa") final Mesa _mesa, @Named("Fecha") final Date _fecha,
		@Named("Hora") final String _hora) {
	return nuevaReserva(_comensales, _mesa, _fecha, _hora,
			uniqueMatch(Cliente.class, new Predicate<Cliente>() {

				@Override
				public boolean apply(Cliente input) {
					// TODO Auto-generated method stub
					return input.getUsuario().getNombre()
							.equals(getUser().getName()) ? true : false;
				}
			}));
}
 
开发者ID:resto-tesis,项目名称:resto-tesis,代码行数:25,代码来源:ReservaServicio.java

示例6: if

import org.apache.isis.applib.annotation.Where; //导入依赖的package包/类
@Action(
        semantics = SemanticsOf.SAFE,
        domainEvent = ActionDomainEvent.class
)
@ActionLayout(
        contributed = Contributed.AS_ASSOCIATION
)
@Property(
)
@PropertyLayout(
        hidden=Where.REFERENCES_PARENT
)
@MemberOrder(name="Feature", sequence = "4")
public ApplicationFeatureViewModel $$(final ApplicationPermission permission) {
    if(permission.getFeatureType() == null) {
        return null;
    }
    final ApplicationFeatureId featureId = getFeatureId(permission);
    return ApplicationFeatureViewModel.newViewModel(featureId, applicationFeatureRepository, container);
}
 
开发者ID:isisaddons-legacy,项目名称:isis-module-security,代码行数:21,代码来源:ApplicationPermission_feature.java

示例7: getParent

import org.apache.isis.applib.annotation.Where; //导入依赖的package包/类
@Property(
        domainEvent = ParentDomainEvent.class
)
@PropertyLayout(hidden=Where.ALL_TABLES)
@MemberOrder(name = "Parent", sequence = "2.6")
public ApplicationFeatureViewModel getParent() {
    final ApplicationFeatureId parentId;
    parentId = getType() == ApplicationFeatureType.MEMBER
            ? getFeatureId().getParentClassId()
            : getFeatureId().getParentPackageId();
    if(parentId == null) {
        return null;
    }
    final ApplicationFeature feature = applicationFeatureRepository.findFeature(parentId);
    if (feature == null) {
        return null;
    }
    final Class<?> cls = viewModelClassFor(parentId, applicationFeatureRepository);
    return (ApplicationFeatureViewModel) container.newViewModelInstance(cls, parentId.asEncodedString());

}
 
开发者ID:isisaddons-legacy,项目名称:isis-module-security,代码行数:22,代码来源:ApplicationFeatureViewModel.java

示例8: getName

import org.apache.isis.applib.annotation.Where; //导入依赖的package包/类
@javax.jdo.annotations.NotPersistent
@Property(
        domainEvent = NameDomainEvent.class,
        editing = Editing.DISABLED
)
@PropertyLayout(
        hidden=Where.OBJECT_FORMS
)
@MemberOrder(name="Id", sequence = "1")
public String getName() {
    final StringBuilder buf = new StringBuilder();
    if(getFamilyName() != null) {
        if(getKnownAs() != null) {
            buf.append(getKnownAs());
        } else {
            buf.append(getGivenName());
        }
        buf.append(' ')
                .append(getFamilyName())
                .append(" (").append(getUsername()).append(')');
    } else {
        buf.append(getUsername());
    }
    return buf.toString();
}
 
开发者ID:isisaddons-legacy,项目名称:isis-module-security,代码行数:26,代码来源:ApplicationUser.java

示例9: newTenancy

import org.apache.isis.applib.annotation.Where; //导入依赖的package包/类
/**
 * @deprecated - use {@link ApplicationTenancyMenu#newTenancy(String, String, ApplicationTenancy)} instead.
 */
@Action(
        domainEvent = NewTenancyDomainEvent.class,
        semantics = SemanticsOf.IDEMPOTENT,
        hidden = Where.EVERYWHERE
)
public ApplicationTenancy newTenancy(
        @Parameter(maxLength = ApplicationTenancy.MAX_LENGTH_NAME)
        @ParameterLayout(named = "Name", typicalLength = ApplicationTenancy.TYPICAL_LENGTH_NAME)
        final String name,
        @Parameter(maxLength = ApplicationTenancy.MAX_LENGTH_PATH)
        @ParameterLayout(named = "Path")
        final String path,
        @Parameter(optionality = Optionality.OPTIONAL)
        @ParameterLayout(named = "Parent")
        final ApplicationTenancy parent) {
    return applicationTenancyRepository.newTenancy(name, path, parent);
}
 
开发者ID:isisaddons-legacy,项目名称:isis-module-security,代码行数:21,代码来源:ApplicationTenancies.java

示例10: getDescriptionSummary

import org.apache.isis.applib.annotation.Where; //导入依赖的package包/类
@Action(semantics = SemanticsOf.SAFE)
@ActionLayout(contributed = Contributed.AS_ASSOCIATION, hidden = Where.OBJECT_FORMS)
public String getDescriptionSummary(){
    StringBuffer summary = new StringBuffer();
    boolean first = true;
    for (OrderItem orderItem : getItems()){
        if (orderItem.getDescription()!=null || orderItem.getDescription()!=""){
            if (!first){
                summary.append(" | ");
            }
            summary.append(orderItem.getDescription());
            first=false;
        }
    }
    return summary.toString();
}
 
开发者ID:estatio,项目名称:estatio,代码行数:17,代码来源:Order.java

示例11: whenMany_returnsFirst

import org.apache.isis.applib.annotation.Where; //导入依赖的package包/类
@Test
public void whenMany_returnsFirst() {

    final InvoiceForLease invoice1 = new InvoiceForLease();
    final InvoiceForLease invoice2 = new InvoiceForLease();
    final InvoiceForLease invoice3 = new InvoiceForLease();

    invoiceForLeaseRepository = new InvoiceForLeaseRepository() {
        @Override
        @Action(hidden = Where.EVERYWHERE, semantics = SemanticsOf.SAFE)
        public List<InvoiceForLease> findMatchingInvoices(Party seller, Party buyer, PaymentMethod paymentMethod, Lease lease, InvoiceStatus invoiceStatus, LocalDate dueDate) {
            return Arrays.asList(invoice1, invoice2, invoice3);
        }
    };

    assertThat(invoiceForLeaseRepository.findMatchingInvoice(null, null, null, null, null, null)).isEqualTo(invoice1);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:18,代码来源:InvoiceRepository_Test.java

示例12: whenEmpty_returnsNull

import org.apache.isis.applib.annotation.Where; //导入依赖的package包/类
@Test
public void whenEmpty_returnsNull() {

    invoiceForLeaseRepository = new InvoiceForLeaseRepository() {
        @Override
        @Action(hidden = Where.EVERYWHERE, semantics = SemanticsOf.SAFE)
        public List<InvoiceForLease> findMatchingInvoices(Party seller, Party buyer, PaymentMethod paymentMethod, Lease lease, InvoiceStatus invoiceStatus, LocalDate dueDate) {
            return Arrays.<InvoiceForLease>asList();
        }

        @Override
        public InvoiceForLease newInvoice(final ApplicationTenancy applicationTenancy, Party seller, Party buyer, PaymentMethod paymentMethod, Currency currency, LocalDate dueDate, Lease lease, String interactionId) {
            return null;
        }
    };
    assertThat(invoiceForLeaseRepository.findMatchingInvoice(null, null, null, null, null, null)).isNull();
}
 
开发者ID:estatio,项目名称:estatio,代码行数:18,代码来源:InvoiceRepository_Test.java

示例13: setUp

import org.apache.isis.applib.annotation.Where; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
    context.checking(new Expectations() {
        {
            oneOf(mockClockService).now();
            will(returnValue(now));
        }
    });

    leaseTerm = new LeaseTermForTesting();
    leaseTerm.setValue(BigDecimal.TEN);

    leaseItem = new LeaseItem() {
        @Override
        @Property(hidden = Where.EVERYWHERE)
        public LeaseTerm currentTerm(LocalDate date) {
            GetCurrentValue.this.getCurrentValueDateArgument = date;
            return leaseTerm;
        }
    };
    leaseItem.clockService = mockClockService;
}
 
开发者ID:estatio,项目名称:estatio,代码行数:23,代码来源:LeaseItem_Test.java

示例14: getApplicationTenancyPath

import org.apache.isis.applib.annotation.Where; //导入依赖的package包/类
@javax.jdo.annotations.Column(
        length = ApplicationTenancy.MAX_LENGTH_PATH,
        allowsNull = "false",
        name = "atPath"
)
@org.apache.isis.applib.annotation.Property(hidden = Where.EVERYWHERE)
public String getApplicationTenancyPath() {
    return applicationTenancyPath;
}
 
开发者ID:bibryam,项目名称:rotabuilder,代码行数:10,代码来源:AbstractPersistable.java

示例15: getApplicationTenancy

import org.apache.isis.applib.annotation.Where; //导入依赖的package包/类
@PropertyLayout(
        hidden = Where.ALL_TABLES,
        describedAs = "Determines those users for whom this object is available to view and/or modify."
)

@Programmatic
public ApplicationTenancy getApplicationTenancy() {
    final ApplicationTenancy applicationTenancy = applicationTenancyRepository.findByPathCached(applicationTenancyPath);
    if (applicationTenancy == null) {
        throw new FatalException("Domain Object without Application Tenancy.");
    }
    return applicationTenancy;
}
 
开发者ID:bibryam,项目名称:rotabuilder,代码行数:14,代码来源:AbstractPersistable.java


注:本文中的org.apache.isis.applib.annotation.Where类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。