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
| <p:outputLabel value="Email:" for="email" /> | |
| <p:inputText id="email" value="#{seuBeanAqui}" | |
| required="true" validatorMessage="Email inválido"> | |
| <f:attribute name="type" value="email" /> | |
| <f:passThroughAttribute name="placeholder" value="E-mail" /> | |
| <f:validateRegex | |
| pattern="[\w\.-]*[a-zA-Z0-9_]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]" /> | |
| <f:ajax event="blur" render="messageEmail" /> | |
| </p:inputText> |
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
| /** | |
| * | |
| * @author anderson | |
| * Enum feito para os estados do Brasil, podendo mudar ou até adicionar indices | |
| */ | |
| public enum EstadosBrasilEnum { | |
| AC,AL,AP,AM,BA,CE,DF,ES,GO,MA,MT,MS,MG,PA,PB,PR,PE,PI,RJ,RN,RS,RO,RR,SC,SP,SE,TO; | |
| } |
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
| public enum StatusBinarioEnum { | |
| ATIVO,INATIVO; | |
| } | |
| @Enumerated(EnumType.STRING) | |
| @Column(nullable = false, name = "status") | |
| private StatusBinarioEnum status; |
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
| @Entity | |
| @Table(name = "evento") | |
| public class Evento { | |
| // ... Outros campos ... | |
| @ManyToOne | |
| @JoinColumn(name = "categoria_id") | |
| private Categoria categoria; |
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
| @NamedQueries({ | |
| @NamedQuery(name = "Lojista.listarTodos", query = "" + "SELECT DISTINCT l FROM Lojista l " | |
| + "LEFT JOIN FETCH l.endereco " + "LEFT JOIN FETCH l.loja " + "WHERE l.status = :pStatus"), | |
| @NamedQuery(name = "Lojista.find", query = "" + "SELECT DISTINCT l FROM Lojista l " | |
| + "LEFT JOIN FETCH l.endereco " + "LEFT JOIN FETCH l.loja " + "WHERE l.id = :pId") }) |
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 br.com.brascov.querocomprar.model.dao; | |
| import java.io.Serializable; | |
| import javax.persistence.EntityManager; | |
| /** | |
| * @author Anderson | |
| * | |
| * classe base que possui os métodos comuns para todas as Daos |
NewerOlder