text stringlengths 3 1.18M |
|---|
package TestPackage;
import static org.junit.Assert.*;
import DBLayer.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class findCityTest {
private DBPerson dbPerson;
@Before
public void setUp() throws Exception {
dbPerson = new DBPerson();
}
@After
pub... |
package GUI;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JTextPane;
import java.awt.SystemColor... |
package GUI;
import ControlLayer.*;
import ModelLayer.*;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JTabbedPane;
import javax.swing.JPanel;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.border.TitledBorder;
import java... |
package GUI;
import java.util.ArrayList;
import javax.swing.JFrame;
import javax.swing.table.AbstractTableModel;
import ModelLayer.Product;
import ModelLayer.SalesOrderLine;
public class ProductSalesTable extends AbstractTableModel {
/**
* Launch the application.
*/
/**
* Create the a... |
package GUI;
import java.awt.Color;
import java.awt.Font;
import java.awt.SystemColor;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import ja... |
package GUI;
import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
... |
package GUI;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import javax.swing.JTextField;
import javax.swing.JLabel;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import ControlLayer.*;... |
package GUI;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton... |
package GUI;
import java.util.ArrayList;
import javax.swing.JFrame;
import javax.swing.table.AbstractTableModel;
import ModelLayer.Product;
import ModelLayer.SalesOrderLine;
public class ProductReturnTable extends AbstractTableModel {
/**
* Launch the application.
*/
/**
* Create the ... |
package GUI;
import java.util.ArrayList;
import javax.swing.table.AbstractTableModel;
import ModelLayer.*;
public class ProductTable extends AbstractTableModel {
private String[] columnNames = { "ProductNumber", "SerialNumber",
"SupplierID", "ProductName", "PurchasePrice", "SalesPrice",
"RentPrice",... |
package GUI;
import java.util.ArrayList;
import javax.swing.table.AbstractTableModel;
import ModelLayer.*;
public class PersonTable extends AbstractTableModel {
private String[] columnNames = { "PhoneNumber", "CustomerType", "Name",
"Address", "ZipCode", "City", "Email", "CompanyName", "CVR Number",
... |
package ControlLayer;
import java.util.ArrayList;
import DBLayer.DBProduct;
import DBLayer.IFDBProduct;
import ModelLayer.Product;
import ModelLayer.Supplier;
import ModelLayer.Tire;
import ModelLayer.Gearbox;
import ModelLayer.Glass;
import ModelLayer.Headlights;
import ModelLayer.BrakeDisc;
public ... |
package ControlLayer;
import java.util.ArrayList;
import DBLayer.DBSupplier;
import DBLayer.DBConnection;
import DBLayer.IFDBSupplier;
import ModelLayer.Supplier;
import ModelLayer.Product;
public class SupplierCtr
{
public SupplierCtr(){
}
//List all suppliers
public ArrayList<Supplier> list... |
package ControlLayer;
import java.util.ArrayList;
import DBLayer.DBConnection;
import DBLayer.DBPerson;
import DBLayer.IFDBPerson;
import ModelLayer.Customer;
import ModelLayer.Employee;
import ModelLayer.Person;
public class PersonCtr {
public PersonCtr()
{
}
//This method return all the ... |
package ControlLayer;
import java.util.ArrayList;
import DBLayer.DBConnection;
import DBLayer.DBInvoice;
import DBLayer.IFDBInvoice;
import ModelLayer.Invoice;
import ModelLayer.SalesOrder;
public class InvoiceCtr
{
public InvoiceCtr()
{
}
// This method return all the customers invoice in a... |
package ControlLayer;
import java.util.ArrayList;
import DBLayer.DBConnection;
import DBLayer.DBStore;
import DBLayer.IFDBStore;
import ModelLayer.Store;
public class StoreCtr {
public StoreCtr()
{
}
//This method returns all Stores in an Arraylist.
public ArrayList<Store> listAllStores()
... |
package ControlLayer;
import java.util.ArrayList;
import DBLayer.DBConnection;
import DBLayer.DBSalesOrder;
import DBLayer.IFDBSalesOrder;
import ModelLayer.Customer;
import ModelLayer.Employee;
import ModelLayer.Product;
import ModelLayer.SalesOrder;
import ModelLayer.SalesOrderLine;
import ModelLayer.Stor... |
package DBLayer;
import java.sql.*;
public class DBGetMax {
/** Creates a new instance of GetMax */
public DBGetMax() {
}
//getMax is for the primary key in the table
public static int getMaxId(String query){
ResultSet results;
int id = -1;
try{
Statement stmt = DBConne... |
package DBLayer;
import ModelLayer.*;
import java.sql.*;
import java.util.ArrayList;
public class DBPerson implements IFDBPerson {
private Connection con;
public DBPerson() {
// tries to connect to the database
con = DBConnection.getInstance().getDBcon();
}
// get all customer
public Array... |
package DBLayer;
import ModelLayer.*;
import java.util.ArrayList;
public interface IFDBProduct
{
public Product findProduct(int productNumber, boolean retriveAssociation);
public ArrayList<Product> listAllProducts(boolean retriveAssociation);
public ArrayList<Tire> listAllTires(boolean retriveAssociatio... |
package DBLayer;
import java.util.ArrayList;
import ModelLayer.*;
public interface IFDBStore {
public ArrayList<Store> listAllStores(boolean retriveAssociation);
public Store findStore(int phoneNumber, boolean retriveAssociation);
public int insertStore(Store store) throws Exception;
public int ... |
package DBLayer;
import ModelLayer.*;
import java.sql.*;
import java.util.ArrayList;
public class DBStore implements IFDBStore {
private Connection con;
// this method tries to connect to the database
public DBStore() {
con = DBConnection.getInstance().getDBcon();
}
// this method lists all s... |
package DBLayer;
import ModelLayer.*;
import java.sql.*;
import java.util.ArrayList;
public class DBInvoice implements IFDBInvoice{
private Connection con;
/** Creates a new instance of DBInvoice */
public DBInvoice() {
con = DBConnection.getInstance().getDBcon();
}
//Implem... |
package DBLayer;
import ModelLayer.*;
import java.util.ArrayList;
public interface IFDBPerson
{
public ArrayList<Customer> listAllCustomers(boolean retriveAssociation);
public ArrayList<Employee> listAllEmployees(boolean retriveAssociation);
public Customer findCustomer(int id, boolean retriveAssociat... |
package DBLayer;
import java.util.ArrayList;
import ModelLayer.*;
public interface IFDBSalesOrder
{
public ArrayList<SalesOrder> findAllSalesOrders(boolean retriveAssociation);
public ArrayList<SalesOrder> findAllSalesOrdersOnCustomer(int phoneNumber);
public ArrayList<SalesOrder> findAllSalesOrdersOn... |
package DBLayer;
import ModelLayer.*;
import java.sql.*;
import java.util.ArrayList;
public class DBSupplier implements IFDBSupplier{
private Connection con;
/** Creates a new instance of DBSupplier */
public DBSupplier() {
con = DBConnection.getInstance().getDBcon();
}
//Impl... |
package DBLayer;
import java.sql.*;
import java.util.ArrayList;
import ModelLayer.*;
public class DBProduct implements IFDBProduct {
private Connection con;
private DBSupplier dbSupplier;
public DBProduct()
{
con = DBConnection.getInstance().getDBcon();
}
//Method is search for a product w... |
package DBLayer;
import java.util.ArrayList;
import ModelLayer.*;
public interface IFDBInvoice
{
public ArrayList<Invoice> listAllInvoiceOnCustomer(boolean retriveAssociation);
public ArrayList<Invoice> listAllInvoiceOnEmployee(boolean retriveAssociation);
public Invoice findInvoice(int invoiceId, bo... |
package DBLayer;
import java.sql.*;
public class DBConnection {
private static final String driver = "jdbc:sqlserver://Balder.ucn.dk";
private static final String databaseName =";databaseName=DM76_1";
private static String userName = "; user=DM76_1";
private static String password = ";password=MaaGodt";
... |
package DBLayer;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import ModelLayer.SalesOrder;
import ModelLayer.SalesOrderLine;
public class DBSalesOrder implements IFDBSalesOrd... |
package DBLayer;
import java.util.ArrayList;
import ModelLayer.*;
public interface IFDBSupplier
{
public ArrayList<Supplier> listAllSuppliers(boolean retriveAssociation);
public Supplier findSupplier(int supplierId, boolean retriveAssociation);
public int insertSupplier(Supplier supplier) throws Exce... |
import java.awt.*;
import java.util.Random;
public class Food {
private int xPos, yPos;
static Random r = new Random();
public Food(){
this.xPos=r.nextInt(30);
this.yPos=r.nextInt(30);
}
public Point getPoint(){
return new Point(xPos,yPos);
}
public void draw(Graphics g, Dimens... |
import javax.swing.*;
public class SnakeGame {
public static void main(String[] args){
JFrame frame = new JFrame("Snake");
frame.add(new TwoPlayerSnakePanel()); //We should eventually replace the SnakePanel with a GamePanel
//The GamePanel will contain the SnakePanel, as well as things like options and score... |
import javax.swing.JPanel;
//TODO Everything...
@SuppressWarnings("serial")
public class GamePanel extends JPanel {
public GamePanel(){
TwoPlayerSnakePanel twoPlayerSnakePanel = new TwoPlayerSnakePanel();
add(twoPlayerSnakePanel);
}
}
|
import java.awt.*;
public class Segment {
static final int UP=0,DOWN=1,LEFT=2,RIGHT=3;
private boolean isHorizontal;
private int currentDirection;
private int xPos,yPos;
public Segment(int currentDirection, int xPos, int yPos){
this.currentDirection=currentDirection;
if (currentDirection<2)
... |
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
import java.util.Random;
@SuppressWarnings("serial")
public class TwoPlayerSnakePanel extends JPanel{
private Snake snake1, snake2;
private Timer timer;
private static Food food;
static Random random;
private int snake1food,snake2fo... |
import java.awt.*;
import java.util.ArrayList;
public class Snake {
ArrayList<Segment> snake;
private int waitingSegments=0;
private int playerNumber;
static final int PLAYER_ONE=0, PLAYER_TWO=1;
static final Color[] PLAYER_ONE_COLORS={Color.RED,Color.GREEN};
static final Color[] PLAYER_TWO_COLORS... |
package eu.lighthouselabs.obd.reader.activity;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import eu.lighthouselabs.obd.reader.R;
import eu.lighthouselabs.obd.reader.command.ObdCommand;
import eu.lighthouselabs.obd.reader.command.ObdMultiCommand;
import eu.lighth... |
package eu.lighthouselabs.obd.reader.activity;
import java.util.ArrayList;
import java.util.Set;
import eu.lighthouselabs.obd.reader.R;
import eu.lighthouselabs.obd.reader.command.ObdCommand;
import eu.lighthouselabs.obd.reader.config.ObdConfig;
import android.app.Activity;
import android.bluetooth.BluetoothAdapter;... |
package eu.lighthouselabs.obd.reader.activity;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import eu.lighthouselabs.obd.reader.R;
import eu.lighthouselabs.obd.reader.command.ObdCommand;
import eu.lighthouselabs.obd.reader.config.ObdConfig;
impo... |
package eu.lighthouselabs.obd.reader.io;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import j... |
package eu.lighthouselabs.obd.reader.io;
import android.content.ComponentName;
import android.content.ServiceConnection;
import android.os.IBinder;
public class ObdReaderServiceConnection implements ServiceConnection {
private ObdReaderService service = null;
public void onServiceConnected(ComponentName name, IBin... |
package eu.lighthouselabs.obd.reader.io;
import eu.lighthouselabs.obd.reader.activity.ObdReaderCommandActivity;
import eu.lighthouselabs.obd.reader.command.ObdCommand;
import eu.lighthouselabs.obd.reader.config.ObdConfig;
import android.bluetooth.BluetoothDevice;
public class ObdCommandConnectThread extends ObdConne... |
package eu.lighthouselabs.obd.reader.io;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Map;
import eu.lighthouselabs.obd.reader.R;
import eu.lighthouselabs.obd.reader.activity.ObdReaderConfigActivity;
import eu.lighthouselabs.obd.reader.command.ObdCommand;
impo... |
package eu.lighthouselabs.obd.reader.io;
import java.util.Map;
import eu.lighthouselabs.obd.reader.network.DataUploader;
public class ObdUploadThread extends Thread {
private String urlString = null;
private Map<String,String> dataMap = null;
private ObdReaderService service = null;
public ObdUploadThread(Strin... |
package eu.lighthouselabs.obd.reader.drawable;
import eu.lighthouselabs.obd.reader.R;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.graphics.drawable.D... |
package eu.lighthouselabs.obd.reader.drawable;
import eu.lighthouselabs.obd.reader.R;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.graphics.drawable.D... |
package eu.lighthouselabs.obd.reader.drawable;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.RectShape;
import android.util.AttributeSet;
i... |
package eu.lighthouselabs.obd.reader.command;
public class FuelPressureObdCommand extends PressureObdCommand{
public FuelPressureObdCommand() {
super("010A","Fuel Press","kPa","atm");
}
public FuelPressureObdCommand(FuelPressureObdCommand other) {
super(other);
}
public int transform(int b) {
return b*3;
... |
package eu.lighthouselabs.obd.reader.command;
public class IntakeManifoldPressureObdCommand extends PressureObdCommand {
public IntakeManifoldPressureObdCommand() {
super("010B","Intake Manifold Press","kPa","atm");
}
public IntakeManifoldPressureObdCommand(IntakeManifoldPressureObdCommand other) {
super(other... |
package eu.lighthouselabs.obd.reader.command;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.HashMap;
import eu.lighthouselabs.obd.reader.io.ObdConnectThread;
public class ObdCommand extends Thread {
protected InputStream in = null;... |
package eu.lighthouselabs.obd.reader.command;
public class TempObdCommand extends IntObdCommand{
public TempObdCommand(String cmd, String desc, String resType, String impType) {
super(cmd, desc, resType, impType);
}
public TempObdCommand(TempObdCommand other) {
super(other);
}
protected int transform(int b) ... |
package eu.lighthouselabs.obd.reader.command;
public class CommandEquivRatioObdCommand extends ObdCommand {
private double ratio = 1.0;
public CommandEquivRatioObdCommand() {
super("0144","Command Equivalence Ratio","","");
}
public CommandEquivRatioObdCommand(String cmd, String desc, String resType, String imp... |
package eu.lighthouselabs.obd.reader.command;
public class FuelEconomyCommandedMAPObdCommand extends FuelEconomyObdCommand {
public static final double AIR_FUEL_RATIO = 14.64;
public static final double FUEL_DENSITY_GRAMS_PER_LITER = 720.0;
public FuelEconomyCommandedMAPObdCommand() {
super("","Fuel Economy Cm... |
package eu.lighthouselabs.obd.reader.command;
import eu.lighthouselabs.obd.reader.config.ObdConfig;
public class FuelEconomyObdCommand extends ObdCommand {
public static final double AIR_FUEL_RATIO = 14.64;
public static final double FUEL_DENSITY_GRAMS_PER_LITER = 720.0;
protected double fuelEcon = -9999.0;
pub... |
package eu.lighthouselabs.obd.reader.command;
public class IntObdCommand extends ObdCommand {
protected int intValue = -9999;
public IntObdCommand(String cmd, String desc, String resType, String impType) {
super(cmd, desc, resType, impType);
}
public IntObdCommand(IntObdCommand other) {
super(other);
}
publ... |
package eu.lighthouselabs.obd.reader.command;
public class ThrottleObdCommand extends IntObdCommand {
public ThrottleObdCommand(String cmd, String desc, String resType) {
super(cmd,desc,resType,resType);
}
public ThrottleObdCommand() {
super("0111","Throttle Position","%","%");
}
public ThrottleObdCommand(Th... |
package eu.lighthouselabs.obd.reader.command;
public class AirIntakeTempObdCommand extends TempObdCommand{
public AirIntakeTempObdCommand() {
super("010F","Air Intake Temp","C","F");
}
public AirIntakeTempObdCommand(AirIntakeTempObdCommand other) {
super(other);
}
}
|
package eu.lighthouselabs.obd.reader.command;
import eu.lighthouselabs.obd.reader.config.ObdConfig;
public class EngineRPMObdCommand extends IntObdCommand{
public EngineRPMObdCommand() {
super("010C",ObdConfig.RPM,"RPM","RPM");
}
public EngineRPMObdCommand(EngineRPMObdCommand other) {
super(other);
}
public... |
package eu.lighthouselabs.obd.reader.command;
import eu.lighthouselabs.obd.reader.config.ObdConfig;
public class FuelEconomyMAPObdCommand extends FuelEconomyObdCommand {
public static final double AIR_FUEL_RATIO = 14.64;
public static final double FUEL_DENSITY_GRAMS_PER_LITER = 720.0;
public FuelEconomyMAPObdCo... |
package eu.lighthouselabs.obd.reader.command;
public class MassAirFlowObdCommand extends ObdCommand {
private double maf = -9999.0;
public MassAirFlowObdCommand() {
super("0110","Mass Air Flow","g/s","g/s");
}
public MassAirFlowObdCommand(MassAirFlowObdCommand other) {
super(other);
}
public String formatRe... |
package eu.lighthouselabs.obd.reader.command;
public class DtcNumberObdCommand extends ObdCommand {
private int codeCount = -1;
private boolean milOn = false;
public DtcNumberObdCommand() {
super("0101","DTC Status","","");
}
public DtcNumberObdCommand(DtcNumberObdCommand other) {
super(other);
}
public St... |
package eu.lighthouselabs.obd.reader.command;
public class AverageFuelEconomyObdCommand extends ObdCommand {
public static final String FUEL_ECONOMY_KEY = "Fuel Economy";
public static final String AVG_FUEL_ECONOMY_KEY = "Fuel Economy Average";
public static final String AVG_FUEL_ECONOMY_COUNT_KEY = "Average Fuel ... |
package eu.lighthouselabs.obd.reader.command;
import eu.lighthouselabs.obd.reader.config.ObdConfig;
public class EngineRunTimeObdCommand extends ObdCommand {
public EngineRunTimeObdCommand() {
super("011F",ObdConfig.RUN_TIME,"","");
}
public EngineRunTimeObdCommand(EngineRunTimeObdCommand other) {
super(oth... |
package eu.lighthouselabs.obd.reader.command;
public class FuelTrimObdCommand extends IntObdCommand {
public FuelTrimObdCommand(String cmd, String desc, String resType) {
super(cmd,desc,resType,resType);
}
public FuelTrimObdCommand(FuelTrimObdCommand other) {
super(other);
}
public FuelTrimObdCommand() {
... |
package eu.lighthouselabs.obd.reader.command;
public class TimingAdvanceObdCommand extends ObdCommand {
public TimingAdvanceObdCommand() {
super("010E","Timing Advance","deg","deg");
}
public TimingAdvanceObdCommand(TimingAdvanceObdCommand other) {
super(other);
}
public String formatResult() {
String res ... |
package eu.lighthouselabs.obd.reader.command;
public class PressureObdCommand extends IntObdCommand {
public PressureObdCommand(String cmd, String desc, String resType, String impType) {
super(cmd,desc,resType,impType);
}
public PressureObdCommand(PressureObdCommand other) {
super(other);
}
public String for... |
package eu.lighthouselabs.obd.reader.command;
import eu.lighthouselabs.obd.reader.config.ObdConfig;
public class SpeedObdCommand extends IntObdCommand {
public SpeedObdCommand() {
super("010D",ObdConfig.SPEED,"km/h","mph");
}
public SpeedObdCommand(SpeedObdCommand other) {
super(other);
}
@Override
public ... |
package eu.lighthouselabs.obd.reader.command;
import java.io.IOException;
public class ObdMultiCommand extends ObdCommand {
private String[] cmds;
public ObdMultiCommand(String[] cmds, String desc, String resType, String impType) {
super(null, desc, resType, impType);
this.cmds = cmds;
}
public ObdMultiComm... |
package eu.lighthouselabs.obd.reader.command;
public class TroubleCodesObdCommand extends ObdCommand {
protected final static char[] dtcLetters = {'P','C','B','U'};
private StringBuffer codes = null;
public TroubleCodesObdCommand() {
super("03","Trouble Codes","","");
codes = new StringBuffer();
}
public Tro... |
package eu.lighthouselabs.obd.reader.network;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URLEncoder;
import java.util.Iterator;
import java.util.Map;
import org.apache.http.client.HttpClient;
import org.apache.http.... |
package eu.lighthouselabs.obd.reader.config;
import java.util.ArrayList;
import eu.lighthouselabs.obd.reader.command.AirIntakeTempObdCommand;
import eu.lighthouselabs.obd.reader.command.CommandEquivRatioObdCommand;
import eu.lighthouselabs.obd.reader.command.DtcNumberObdCommand;
import eu.lighthouselabs.obd.reader.co... |
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import junit.framework.TestCase;
public class test_UserProfiler extends TestCase {
userProfiler tester;
userProfiler a;
Calendar cal = new Gr... |
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
//import java.util.GregorianCalendar;
import java.util.HashMap;
public class userProfiler {
private float height, weight;
private Date dob;
private static int uid;
private String userSerial;
private ... |
package ControlLayer;
import ModelLayer.*;
import DBLayer.*;
import java.util.ArrayList;
/**
*/
public class CtrCustomer {
public CtrCustomer() {
}
public void NewCustomer(Customer cusObj)
{
IFDBCustomer dbCus = new DBCustomer();
dbCus.insert... |
package ControlLayer;
import ModelLayer.*;
import DBLayer.*;
import java.util.ArrayList;
public class CtrProduct {
public CtrProduct() {
}
public ArrayList getAllProducts()
{
IFDBProduct dbProd = new DBProduct();
ArrayList allProd = new ArrayList();
allProd = dbProd.getAllProd... |
package ControlLayer;
import ModelLayer.*;
import DBLayer.*;
import java.util.ArrayList;
/**
*/
public class CtrCustomerGroup {
public CtrCustomerGroup() {
}
public void NewCtrCustomerGroup(CustomerGroup cusGObj)
{
IFDBCustomerGroup dbCusG = new DBCustomerG... |
package ControlLayer;
import ModelLayer.Sale;
import ModelLayer.SalesLine;
import DBLayer.IFDBSale;
import DBLayer.DBSale;
import java.util.ArrayList;
public class CtrSale
{
private IFDBSale dbSale = new DBSale();
private CtrSalesLine ctrSalesLine = new CtrSalesLine();
public ArrayList getAllSales()... |
package ControlLayer;
import ModelLayer.*;
import DBLayer.*;
import java.util.ArrayList;
public class CtrEmployee {
/** Creates a new instance of CtrEmp */
public CtrEmployee() {
}
public void insertNew(Employee empObj)
{
IFDBEmployee dbEmp = new DBEmployee();... |
package ControlLayer;
import java.util.ArrayList;
import DBLayer.DBSalesLine;
import DBLayer.IFDBSalesLine;
import ModelLayer.SalesLine;
public class CtrSalesLine
{
private IFDBSalesLine dbSalesLine = new DBSalesLine();
public ArrayList<SalesLine> listSalesLines(int saleID)
{
return dbSalesLi... |
package ControlLayer;
import DBLayer.DBReservation;
import DBLayer.DBReservationRelation;
import DBLayer.IFDBReservation;
import DBLayer.IFDBReservationRelation;
import ModelLayer.Employee;
import ModelLayer.Reservation;
import ModelLayer.ReservationRelation;
import java.util.ArrayList;
/**
*
* @author gartner
*/
... |
package ControlLayer;
import ModelLayer.*;
import DBLayer.*;
import java.util.ArrayList;
/**
*
* @author gartner
*/
public class CtrSupplier {
public ArrayList getAllSuppliers()
{
IFDBSupplier dbSupplier = new DBSupplier();
ArrayList allSuppliers = new ArrayList();
allSuppliers =... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* OpretProdukt.java
*
* Created on Nov 22, 2011, 8:21:44 PM
*/
package GUILayer;
import ControlLayer.CtrProduct;
import ModelLayer.Product;
import ControlLayer.CtrSupplier;
import ModelLayer.Supplier;
/**
*
* @... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* OpretKundeGUI.java
*
* Created on Nov 17, 2011, 8:25:09 AM
*/
package GUILayer;
import ControlLayer.CtrCustomer;
import ControlLayer.CtrCustomerGroup;
import DBLayer.DBCustomer;
import ModelLayer.Customer;
imp... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* OpretLeverandor.java
*
* Created on Dec 6, 2011, 11:45:18 AM
*/
package GUILayer;
import ControlLayer.CtrSupplier;
import ModelLayer.Supplier;
import ControlLayer.CtrProduct;
/**
*
* @author R3l4X
*/
public... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* FindReservation.java
*
* Created on Dec 1, 2011, 12:24:32 PM
*/
package GUILayer;
import ControlLayer.CtrReservation;
import ModelLayer.Reservation;
/**
*
* @author R3l4X
*/
public class FindReservation e... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* OpretSalg.java
*
* Created on Nov 20, 2011, 3:40:57 AM
*/
package GUILayer;
import java.awt.Dimension;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.swing.JFrame;
import javax.swing.JL... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* AlleKunderGUI.java
*
* Created on Dec 5, 2011, 10:37:35 AM
*/
package GUILayer;
import ControlLayer.CtrCustomer;
import ModelLayer.Customer;
import java.util.ArrayList;
/**
*
* @author R3l4X
*/
public clas... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* OpretReservation.java
*
* Created on Dec 1, 2011, 11:09:10 AM
*/
package GUILayer;
/**
*
* @author R3l4X
*/
public class OpretReservation extends javax.swing.JFrame {
/** Creates new form OpretReservat... |
package GUILayer;
import ControlLayer.CtrCustomer;
import ControlLayer.CtrEmployee;
import ControlLayer.CtrSupplier;
import ModelLayer.Customer;
import ModelLayer.Employee;
import ModelLayer.Product;
import ModelLayer.Supplier;
import javax.swing.UIManager.*;
import java.util.Date;
import ControlLayer.CtrSale;
import... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* OpretMedarbejder.java
*
* Created on Dec 6, 2011, 12:18:17 PM
*/
package GUILayer;
import ControlLayer.CtrEmployee;
import ModelLayer.Employee;
/**
*
* @author R3l4X
*/
public class OpretMedarbejder exten... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* FindSalg.java
*
* Created on Dec 1, 2011, 12:18:21 PM
*/
package GUILayer;
import ControlLayer.CtrSalesLine;
import ModelLayer.Sale;
import ModelLayer.SalesLine;
import java.util.ArrayList;
/**
*
* @author ... |
package DBLayer;
import ModelLayer.Supplier;
import java.sql.*;
import java.util.ArrayList;
public class DBSupplier implements IFDBSupplier
{
private Connection con;
public DBSupplier()
{
con = DBConnection.getInstance().getDBcon();
}
@Override
public ArrayList getAllSuppl... |
package DBLayer;
import ModelLayer.*;
import java.util.ArrayList;
public interface IFDBProduct
{
public ArrayList<Product> getAllProducts(boolean retriveAssociation);
public Product searchProductOnName(String attValue, boolean retriveAssociation);
public Product findProduct(int productID, boolea... |
package DBLayer;
import GUILayer.MainGUI;
import java.sql.*;
import java.util.ArrayList;
import ModelLayer.Customer;
import ModelLayer.CustomerGroup;
public class DBCustomer implements IFDBCustomer
{
private Connection con;
public DBCustomer()
{
con = DBConnection.getInstance().getDBcon();
... |
package DBLayer;
import ModelLayer.Product;
import ModelLayer.Sale;
import java.sql.*;
import java.util.ArrayList;
import ModelLayer.SalesLine;
import ControlLayer.CtrProduct;
public class DBSalesLine implements IFDBSalesLine
{
private Connection con;
public DBSalesLine()
{
con = DBConnection... |
package DBLayer;
import ModelLayer.*;
import java.util.ArrayList;
/**
*
* @author gartner
*/
public interface IFDBSale
{
public ArrayList<Sale> getAllSales(boolean retriveAssociation);
public Sale searchSaleID(int saleID, boolean retriveAssociation);
public Sale findSale(int saleID, boolean re... |
package DBLayer;
import java.sql.*;
public class GetMax {
public GetMax() {
}
public static int getMaxId(String query){
ResultSet results;
int id = -1;
try{
Statement stmt = DBConnection.getInstance().getDBcon().createStatement();
results = stmt.executeQuery(query);
if( res... |
package DBLayer;
import ModelLayer.Customer;
import java.sql.*;
import java.util.ArrayList;
import ModelLayer.Sale;
import ModelLayer.SalesLine;
public class DBSale implements IFDBSale
{
private Connection con;
public DBSale()
{
con = DBConnection.getInstance().getDBcon();
}
@Ov... |
package DBLayer;
import ModelLayer.*;
import java.util.ArrayList;
/**
*
* @author gartner
*/
public interface IFDBSupplier
{
public ArrayList<Supplier> getAllSuppliers(boolean retriveAssociation);
public Supplier searchSupplierID(int supplierID, boolean retriveAssociation);
public Supplier fin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.