Skip to content

Instantly share code, notes, and snippets.

Adrian Flores ajfmo

Block or report user

Report or block ajfmo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ajfmo
ajfmo / Dao.java
Created Mar 12, 2018 — forked from james-d/Dao.java
Business model and data integration tier for the laboratory information management system. See also https://gist.github.com/james-d/e485ac525c71e20bb453
View Dao.java
package edu.marshall.genomics.lims.data;
import java.util.List;
import edu.marshall.genomics.lims.entities.Investigator;
import edu.marshall.genomics.lims.entities.Project;
import edu.marshall.genomics.lims.entities.Sample;
public interface Dao {
public List<Investigator> getAllInvestigators() throws DaoException ;
@ajfmo
ajfmo / EditCell.java
Created Feb 20, 2018 — forked from james-d/EditCell.java
(Fairly) reusable edit cell that commits on loss of focus on the text field. Overriding the commitEdit(...) method is difficult to do without relying on knowing the default implementation, which I had to do here. The test code includes a key handler on the table that initiates editing on a key press.
View EditCell.java
import javafx.event.Event;
import javafx.scene.control.ContentDisplay;
import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableColumn.CellEditEvent;
import javafx.scene.control.TablePosition;
import javafx.scene.control.TableView;
import javafx.scene.control.TextField;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
@ajfmo
ajfmo / .gitignore
Created Feb 16, 2018 — forked from chhh/.gitignore
.gitignore file for IDEA, Eclipse, NetBeans
View .gitignore
#
# Project specific excludes
#
tomcat
#
# Default excludes
#
View DepositoDAO.java
import java.util.List;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Root;
import org.hibernate.Session;
import org.hibernate.Transaction;
import ajfmo.inventario.entities.Deposito;
@ajfmo
ajfmo / HibernateUtil.java
Created Feb 16, 2018
Hibernate singleton class
View HibernateUtil.java
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.boot.MetadataSources;
import org.hibernate.boot.registry.StandardServiceRegistry;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
public class HibernateUtil {
private static SessionFactory factory;
private static StandardServiceRegistry registry;
@ajfmo
ajfmo / Productos.java
Last active Feb 16, 2018
Entity with annotations and JavaFX Properties
View Productos.java
package ajfmo.inventario.entities;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@ajfmo
ajfmo / Deposito.java
Last active Feb 16, 2018
Entity bean with JavaFX properties
View Deposito.java
package ajfmo.inventario.entities;
import static javax.persistence.GenerationType.IDENTITY;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
@ajfmo
ajfmo / Investigator.java
Created Feb 15, 2018 — forked from james-d/Investigator.java
Example of JPA entities that use JavaFX properties. These use a "super-lazy" idiom for instantiating the properties, and implement Externalizable to work around the lack of Serialization support in the FX property classes.
View Investigator.java
package edu.marshall.genomics.lims.entities;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;
View Movimientos.fxml
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.DatePicker?>
<?import javafx.scene.control.SplitPane?>
<?import javafx.scene.control.TableColumn?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
View database.sql
-- phpMyAdmin SQL Dump
-- version 4.7.5
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 15-02-2018 a las 16:14:41
-- Versión del servidor: 5.7.17-log
-- Versión de PHP: 5.6.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
You can’t perform that action at this time.