This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.nicequestion.donatas.adf.validate; | |
| import javax.el.ValueExpression; | |
| import javax.faces.component.UIComponent; | |
| import javax.faces.context.FacesContext; | |
| import javax.faces.validator.BeanValidator; | |
| import javax.faces.validator.FacesValidator; | |
| import javax.faces.validator.ValidatorException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.concurrent.CountDownLatch; | |
| import java.util.concurrent.ExecutorService; | |
| import java.util.concurrent.Executors; | |
| import org.junit.After; | |
| import org.junit.Before; | |
| import org.junit.Test; | |
| import static org.junit.Assert.assertTrue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.servlet.*; | |
| import javax.servlet.annotation.*; | |
| import javax.servlet.http.*; | |
| import java.io.IOException; | |
| import static java.util.concurrent.TimeUnit.NANOSECONDS; | |
| @WebFilter (value="/*", | |
| initParams=({ | |
| @WebInitParam(name="duration", value="1") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.jelies.spring3tomcat7.repository; | |
| import org.hibernate.Criteria; | |
| import org.hibernate.ScrollableResults; | |
| import org.hibernate.StatelessSession; | |
| import org.hibernate.Transaction; | |
| import org.hibernate.criterion.Order; | |
| import org.hibernate.criterion.Restrictions; | |
| import org.joda.time.LocalDate; | |
| import org.springframework.beans.factory.annotation.Autowired; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lala | |
| begin | |
| sddasdas | |
| asdasdasd | |
| asdasd | |
| end | |
| lolo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import static java.util.Collections.list; | |
| import java.sql.SQLException; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import javax.enterprise.context.RequestScoped; | |
| import javax.enterprise.inject.Specializes; | |
| import javax.inject.Inject; | |
| import javax.servlet.http.HttpServletRequest; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package fx.time; | |
| import java.sql.Date; | |
| import java.time.LocalDate; | |
| import javax.persistence.AttributeConverter; | |
| import javax.persistence.Converter; | |
| @Converter(autoApply = true) | |
| public class PersistentLocalDate implements AttributeConverter<LocalDate, Date> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.time.LocalDate; | |
| import java.time.temporal.TemporalAdjusters; | |
| public class DatasImportantesNaoTestavel { | |
| public LocalDate diaDoProgramadorDesseAno(){ | |
| //como fazer para testar uma data do passado, por exemplo, de 2012? | |
| return LocalDate.now().with(TemporalAdjusters.firstDayOfYear()).plusDays(255); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.lang.annotation.ElementType; | |
| import java.lang.annotation.Retention; | |
| import java.lang.annotation.RetentionPolicy; | |
| import java.lang.annotation.Target; | |
| @Retention(RetentionPolicy.RUNTIME) | |
| @Target(ElementType.METHOD) | |
| public @interface PreventExternalAccess { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package icob.web.interceptor; | |
| import java.util.Iterator; | |
| import java.util.Locale; | |
| import javax.enterprise.context.ApplicationScoped; | |
| import javax.enterprise.inject.Specializes; | |
| import javax.inject.Inject; | |
| import javax.validation.ConstraintViolation; | |
| import javax.validation.MessageInterpolator; |