Skip to content

Instantly share code, notes, and snippets.

View riferrei's full-sized avatar
:octocat:

Ricardo Ferreira riferrei

:octocat:
View GitHub Profile
public class HelloWorld {
public static void main(String args[]) {
}
}
public interface SampleService {
public LoanRequest createRequest(LoadRequest loanRequest);
}
@Retention(value=RetentionPolicy.RUNTIME)
@Target(value=ElementType.FIELD)
public @interface CipherKey {
}
@Retention(value=RetentionPolicy.RUNTIME)
@Target(value=ElementType.FIELD)
public @interface CipherData {
}
@Retention(value=RetentionPolicy.RUNTIME)
@Target(value=ElementType.FIELD)
public @interface CipherKey {
}
@Retention(value=RetentionPolicy.RUNTIME)
@Target(value=ElementType.FIELD)
public @interface CipherData {
}
public class CipherEntityListener {
@PrePersist @PreUpdate
@SuppressWarnings("unchecked")
public void cipherEntityUsingMD5(Object entity) throws Exception {
CipherHelper cipherHelper = null;
String privateKey = null;
String recordData = null;
StringBuffer sb = null;
Class classType = null;
@Entity
@Table(name="tab_cliente")
@SuppressWarnings("serial")
@EntityListeners(CipherEntityListener.class)
public class Cliente implements Serializable {
@Id
@Column(name="cod_cliente")
@GeneratedValue(strategy=GenerationType.IDENTITY)
private int codigo;
package xxx.yyy.zzz;
import java.io.Serializable;
@SuppressWarnings("serial")
public class PedidoMultiplicacao implements Serializable {
private int a;
private int b;
package xxx.yyy.zzz;
import java.io.Serializable;
@SuppressWarnings("serial")
public class ResultadoMultiplicacao implements Serializable {
private int valor;
public int getValor() {