This file contains 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.Annotation; | |
import java.lang.reflect.Type; | |
import java.time.LocalDate; | |
import javax.ws.rs.ext.ParamConverter; | |
import javax.ws.rs.ext.ParamConverterProvider; | |
import javax.ws.rs.ext.Provider; | |
@Provider | |
public class LocalDateParamConverterProvider implements ParamConverterProvider { |
This file contains 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 dev.rinaldo.datahora; | |
import java.time.Duration; | |
import java.time.LocalDate; | |
import java.time.LocalTime; | |
import java.time.Month; | |
/** | |
* JAVA 8 - API de Data e Hora (Duration) | |
* |
This file contains 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 dev.rinaldo.datahora; | |
import java.time.Instant; | |
import java.time.LocalDate; | |
import java.time.LocalDateTime; | |
import java.time.LocalTime; | |
import java.time.Month; | |
import java.time.ZoneId; | |
import java.time.ZonedDateTime; | |
import java.time.temporal.ChronoUnit; |
This file contains 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 dev.rinaldo.java8interfaces.defaultmethod; | |
// RinaldoDev - JAVA 8: Métodos DEFAULT em INTERFACES | |
public class AssinaturasIguais { | |
public static void main(String[] args) { | |
new Pessoa().correrRapido(); | |
} | |
interface Corredor { |
This file contains 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 static void main(String[] args) { | |
new Thread(new Runnable() { | |
@Override | |
public void run() { | |
System.out.println("Hello World"); | |
} | |
}).run(); | |
} |
This file contains 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 | |
public class Usuario { | |
@Id | |
private Long id; | |
@Column | |
private String primeiroNome; | |
@Column | |
private String sobrenome; | |
@Column | |
private String email; |
This file contains 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 List<Usuario> recupereUsuarioComEnderecos(Long idUsuario) { | |
Usuario usuario = db.findById(idUsuario); | |
List<Endereco> enderecos = db.findByIdUsuario(idUsuario); | |
usuario.setEnderecos(enderecos); | |
return usuario; | |
} |
This file contains 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 | |
public class Usuario { | |
@Id | |
private Long id; | |
@Column | |
private String primeiroNome; | |
@Column | |
private String sobrenome; | |
@Column | |
private String email; |
This file contains 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 | |
public class Usuario { | |
@Id | |
private Long id; | |
@Column | |
private String primeiroNome; | |
@Column | |
private String sobrenome; | |
@Column | |
private String email; |
This file contains 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 | |
public class Usuario { | |
@Id | |
private Long id; | |
@Column | |
private String primeiroNome; | |
@Column | |
private String sobrenome; | |
@Column | |
private String email; |
NewerOlder