-
Removida classe
Linkcaseira dos projetos livraria e payfast. -
Na classe
PagamentoResourcedo payfast, foi criado o métodogetTransitionsque retorna um array deLinkdo JAX-RS com as transições possíveis, de acordo com o status do pagamento. -
O array de
Linké utilizado no métodolinksdoResponseBuilderdo JAX-RS:Response.ok().entity(pagamento).links(links).build()
-
Na classe
ClienteRestda livraria, foi modificado o código dos métodoscriarPagamentoeconfirmarPagamentopara utilizar oLinkdo JAX-RS.
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 br.com.sippe.emi.util.Prompt; | |
| import org.apache.log4j.Level; | |
| import br.com.cabal.commons.formatacao.Formata; | |
| Prompt.escrevaln(Level.ERROR, FormataTexto.escreverPrintSackTrace(e)); |
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
| #.##0,00_-;[Vermelho]-#.##0,00_-;_-* "-"??_-;_-@_- |
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
| with separador_chaves as ( | |
| select regexp_substr(&p_valor,'[^;]+', 1, level) as chaves_e_valores | |
| from dual | |
| connect by regexp_substr(&p_valor,'[^;]+', 1, level) is not null | |
| ), | |
| valores_por_chaves as ( | |
| select substr(chaves_e_valores,instr(chaves_e_valores,'#')+1) as valor | |
| from separador_chaves | |
| where instr(chaves_e_valores,&p_chaves) > 0 | |
| ) |
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
| with | |
| dts as ( | |
| select | |
| to_date(to_char(max(l.fecha1), 'dd/mm/yyyy hh24:mi:ss'), 'dd/mm/yyyy hh24:mi:ss') as data_inicial, | |
| to_date(to_char(max(l.fecha2), 'dd/mm/yyyy hh24:mi:ss'), 'dd/mm/yyyy hh24:mi:ss') as data_final | |
| from debito.log_dia l | |
| where l.fecha1 >= '13/02/2017'--trunc(sysdate) | |
| and l.fecha2 < '14/02/2017'--trunc(sysdate+1) | |
| ), | |
| dif as ( |
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
| É muito comum nos projetos Java com o framework Hibernate utilizar a classe Criteria, então, o que é o Criteria? | |
| O Criteria é uma classe utilizada para substituir o uso de querys (HQL) pelo uso de métodos, deixando assim o seu projeto ainda mais independente do banco de dados utilizado. | |
| Quando começa o desenvolvimento dos métodos de busca com Criteria sempre é utilizado a classe Restrictions, hoje será explicado o que faz cada um dos métodos dessa classe. | |
| allEq(Map propertyNameValues) -Aplica “igual” para cada propriedade no conjunto de chaves do Mapa. | |
| and(Criterion... predicates) -Retorna o conjunto de múltiplas expressões. | |
| and(Criterion lhs, Criterion rhs) - Retorna o conjunto de duas expressões. | |
| between(String propertyName, Object lo, Object hi) - Aplica um “entre” no campo entre os dois parâmetros passados, é muito comum ser utilizado em campos data. | |
| conjunction() - Expressões agrupadas em um único conjunto. | |
| disjunction() - Expressões desagrupadas em um único conjunto. | |
| eq(String propertyName |
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
| SELECT trim(to_char(floor(((date1-date2)*24*60*60)/3600), '00')) || ':' || | |
| trim(to_char(floor((((date1-date2)*24*60*60) - floor(((date1-date2)*24*60*60)/3600)*3600)/60), '00')) || ':' || | |
| trim(to_char(round((((date1-date2)*24*60*60) - floor(((date1-date2)*24*60*60)/3600)*3600 - | |
| (floor((((date1-date2)*24*60*60) - floor(((date1-date2)*24*60*60)/3600)*3600)/60)*60) )), '00')) | |
| as time_difference | |
| FROM dates; |
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
| select sysdate as dat, | |
| sysdate + ((2/3600) * (0.02)) as um_segundo | |
| from dual; |
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
| -startup | |
| plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar | |
| --launcher.library | |
| plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.300.v20150602-1417 | |
| -product | |
| org.eclipse.epp.package.jee.product | |
| --launcher.defaultAction | |
| openFile | |
| --launcher.XXMaxPermSize | |
| 256M |
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.io.IOException; | |
| import javax.annotation.Priority; | |
| import javax.ws.rs.Priorities; | |
| import javax.ws.rs.container.ContainerRequestContext; | |
| import javax.ws.rs.container.ContainerRequestFilter; | |
| import javax.ws.rs.core.HttpHeaders; | |
| import javax.ws.rs.core.Response; | |
| import javax.ws.rs.core.Response.Status; | |
| import javax.ws.rs.ext.Provider; |
NewerOlder