text
stringlengths
3
1.18M
package team.api; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import org.apache.log4j.Logger; import study.itwill.common.DBHandler; import team.item.health_re_saveItem; /** * CRUD 처리를 하는 클래스 만들기 * ---------------------------------------------------------- ...
package team.api; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import org.apache.log4j.Logger; import study.itwill.common.DBHandler; import team.item.b_video_saveItem; /** * CRUD 처리를 하는 클래스 만들기 * ---------------------------------------------------------- * ----...
package team.api; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import org.apache.log4j.Logger; import study.itwill.common.DBHandler; import team.item.Health_typeItem; /** * CRUD 처리를 하는 클래스 만들기 * -------------------------------------------- * 데이터 입출력이 필요한 기능에 ...
package team.api; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import org.apache.log4j.Logger; import study.itwill.common.DBHandler; import team.item.HealthItem11; import team.item.h_video_saveItem; /** * CRUD 처리를 하는 클래스 만들기 * -----------------------------...
package team.api; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import org.apache.log4j.Logger; import study.itwill.common.DBHandler; import team.item.MemberItem; public class Member { static Logger logger = Logger.getLogger(Member.class); private static f...
package team.api; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import org.apache.log4j.Logger; import study.itwill.common.DBHandler; public class board_save_reply { static Logger logger = Logger.getLogger(board_save_reply.class); private static final Stri...
package team.api; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import org.apache.log4j.Logger; import study.itwill.common.DBHandler; import team.item.boardItem; /** * CRUD 처리를 하는 클래스 만들기 * ------------------------------------------------------------------------...
package team.item; public class MemberItem { private int seq; private String user_id; private String user_pw; private String hp_number; private String email; private String reg_date; private String edit_date; public int getSeq() { return seq; } public void setSeq(int seq) { this.seq = se...
package team.item; public class HealthItem11 { private int seq; private String video_src; private String title; private String reg_date; private String edit_date; private int Health_type_seq; public int getSeq() { return seq; } public void setSeq(int seq) { this.seq = seq; } public String getV...
package team.item; public class health_re_saveItem { private int seq; private String h_reply; private String reg_date; private String edit_date; private int member_seq; private int h_video_save_seq; private String user_id; public int getSeq() { return seq; } public void setSeq(int seq) { ...
package team.item; public class HealthItem { private int seq; private String health_name; private String reg_date; private String edit_date; public int getSeq() { return seq; } public void setSeq(int seq) { this.seq = seq; } public String getHealth_name() { return health_name; } public void setHealt...
package team.item; public class Health_typeItem { private int seq; private String health2_name; private String reg_date; private String edit_date; private int Health_seq; public int getSeq() { return seq; } public void setSeq(int seq) { this.seq = seq; } public String getHealth2_name() { return healt...
package team.item; public class boardItem { int seq; String board_name; String reg_date; String edit_date; public boardItem(int seq, String board_name, String reg_date, String edit_date) { super(); this.seq = seq; this.board_name = board_name; this.reg_date = reg_date; this.edit_da...
package team.item; public class h_video_saveItem { private int seq; private String video_src; private String title; private String reg_date; private String edit_date; private int Health_type_seq; private int h_good; private int h_hit; private int member_seq; public int getSeq() { return seq; } public v...
package team.item; public class board_save_replyitem { private int seq; private String b_reply; private String reg_date; private String edit_date; private int member_seq; private int b_video_save_seq; public board_save_replyitem(int seq, String b_reply, String reg_date, String edit_date, int m...
package team.item; public class b_video_saveItem { int seq; private String video_src; private String title; private String content; private String reg_date; private String edit_date; private int board_seq; private int b_good; private int b_hit; private int member_seq; public b_video_saveI...
package com.buymobile.service; public interface ErrorConstant { String MOBILE_NOT_EXIST = "1101"; }
package com.buymobile.service; import java.util.List; import com.buymobile.domain.Type; public interface TypeService { public void addType(Type type); public void deleteType(Integer id); public Type getTypeById(Integer id); public void updateType(Type type); public List<Type> listAllTy...
package com.buymobile.service; import java.util.List; import com.buymobile.domain.Property; public interface PropertyService { public void addProperty(Property property); public void deleteTypeProperty(Integer id); public Property getPropertyById(Integer id); public void updateProperty(Pr...
package com.buymobile.service; public class BusinessException extends RuntimeException { /** * serialVersionUID */ private static final long serialVersionUID = -6463634739384078477L; private String errorCode; public BusinessException(String errorCode,Throwable ex){ super(errorCode,ex); th...
package com.buymobile.service; import java.util.List; import com.buymobile.domain.Value; public interface ValueService { public Value getValueById(Integer id); public void addValue(Value value); public void updateValue(Value value); public List<Value> getValuesByPropertyId(Integer propertyI...
package com.buymobile.service; import java.util.List; import java.util.Map; public interface CustomerService { int findCount(Map map); List findList(Map map); }
package com.buymobile.service.impl; import java.util.Date; import java.util.Map; import com.buymobile.components.page.Page; import com.buymobile.dao.GoodsDAO; import com.buymobile.domain.Goods; import com.buymobile.service.GoodsService; public class GoodsServiceImpl implements GoodsService { private Go...
package com.buymobile.service.impl; import java.util.HashMap; import java.util.List; import java.util.Map; import com.buymobile.dao.TypeDAO; import com.buymobile.domain.Type; import com.buymobile.service.TypeService; import com.buymobile.utils.Constant; public class TypeServiceImpl implements TypeService ...
package com.buymobile.service.impl; import java.util.List; import java.util.Map; import com.buymobile.dao.CompanyDAO; import com.buymobile.domain.Company; import com.buymobile.service.CompanyService; public class CompanyServiceImpl implements CompanyService { private CompanyDAO companyDAO; public...
package com.buymobile.service.impl; import java.util.HashMap; import java.util.List; import java.util.Map; import com.buymobile.dao.ValueDAO; import com.buymobile.domain.Value; import com.buymobile.service.ValueService; import com.buymobile.utils.Constant; public class ValueServiceImpl implements ValueSer...
package com.buymobile.service.impl; import java.util.HashMap; import java.util.List; import java.util.Map; import com.buymobile.dao.PropertyDAO; import com.buymobile.domain.Property; import com.buymobile.service.PropertyService; public class PropertyServiceImpl implements PropertyService { private Prop...
package com.buymobile.service.impl; import java.util.List; import java.util.Map; import com.buymobile.dao.CustomerDAO; import com.buymobile.domain.Customer; import com.buymobile.service.CustomerService; public class CustomerServiceImpl implements CustomerService{ private CustomerDAO customerDAO; p...
package com.buymobile.service; import java.util.List; import java.util.Map; import com.buymobile.domain.Company; public interface CompanyService { Company getByUserName(String userName); int findCount(Map map); List findList(Map map); void save(Company company); void update(Company ...
package com.buymobile.service; import java.util.Map; import com.buymobile.components.page.Page; import com.buymobile.domain.Goods; public interface GoodsService { public void addGoods(Goods goods); public Page searchGoodsByCriteria(Map<String,Object> criteria,int pageIndex,int pageSize); }...
package com.buymobile.domain; public class Value { private Integer id; private Property property; private String name; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Property getProperty() { return property; } public void setProper...
package com.buymobile.domain; import java.util.List; public class Type { private Integer id; private String name; private List<Property> properties; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } ...
package com.buymobile.domain; import java.util.Date; public class Goods { private Integer id; private String name; private Long price; private String brief; private String introduction; private Company company; private Date insertTime; private Integer typeId; private Integer status; public...
package com.buymobile.domain; import java.util.List; public class Property { private Integer id; private String name; private Type type; private List<Value> values; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { re...
package com.buymobile.utils; public abstract class Constant { public static final String ORDER_BY_CLAUSE = "orderClause"; }
package com.buymobile.utils; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class ReflectUtil { private static ...
package com.buymobile.dao; public interface CustomerDAO extends SqlMapDao{ }
package com.buymobile.dao; public interface PropertyDAO extends SqlMapDao{ }
package com.buymobile.dao; public interface GoodsDAO extends SqlMapDao{ }
package com.buymobile.dao; import java.util.List; import java.util.Map; import com.buymobile.domain.Company; public interface CompanyDAO extends SqlMapDao{ }
package com.buymobile.dao; import java.util.List; import java.util.Map; import org.springframework.dao.DataAccessException; import com.buymobile.components.page.Page; import com.ibatis.sqlmap.client.event.RowHandler; public interface SqlMapDao { public Page queryForPage(final String statementName, ...
package com.buymobile.dao.impl; import java.util.List; import java.util.Map; import com.buymobile.dao.CompanyDAO; import com.buymobile.domain.Company; public class CompanyDAOImpl extends SqlMapDaoImpl implements CompanyDAO { }
package com.buymobile.dao.impl; import com.buymobile.dao.ValueDAO; public class ValueDAOImpl extends SqlMapDaoImpl implements ValueDAO{ }
package com.buymobile.dao.impl; public class BaseInformationDAOImpl extends SqlMapDaoImpl{ }
package com.buymobile.dao.impl; public class GoodsValueDAOImpl extends SqlMapDaoImpl{ }
package com.buymobile.dao.impl; public class ImageDAOImpl extends SqlMapDaoImpl{ }
package com.buymobile.dao.impl; import java.util.List; import java.util.Map; import org.apache.log4j.Logger; import org.springframework.dao.DataAccessException; import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport; import com.buymobile.components.ibatis.CountStatementHelper; import com.bu...
package com.buymobile.dao.impl; import com.buymobile.dao.PropertyDAO; public class PropertyDAOImpl extends SqlMapDaoImpl implements PropertyDAO{ }
package com.buymobile.dao.impl; public class LogDAOImpl extends SqlMapDaoImpl{ }
package com.buymobile.dao.impl; public class OrdersDAOImpl extends SqlMapDaoImpl{ }
package com.buymobile.dao.impl; import com.buymobile.dao.GoodsDAO; public class GoodsDAOImpl extends SqlMapDaoImpl implements GoodsDAO{ }
package com.buymobile.dao.impl; import com.buymobile.dao.TypeDAO; public class TypeDAOImpl extends SqlMapDaoImpl implements TypeDAO{ }
package com.buymobile.dao.impl; import com.buymobile.dao.CustomerDAO; public class CustomerDAOImpl extends SqlMapDaoImpl implements CustomerDAO{ }
package com.buymobile.dao; public interface TypeDAO extends SqlMapDao{ }
package com.buymobile.dao; public interface ValueDAO extends SqlMapDao{ }
package com.buymobile.components.ibatis; import org.hibernate.dialect.Dialect; public class MySql5Dialect extends Dialect{ protected static final String SQL_END_DELIMITER = ";"; public String getLimitString(String sql, boolean hasOffset) { return MySql5PageHepler.getLimitString(sql,-1,-1); } pu...
package com.buymobile.components.ibatis; import java.sql.Connection; import java.sql.SQLException; import com.ibatis.common.jdbc.exception.NestedSQLException; import com.ibatis.sqlmap.client.event.RowHandler; import com.ibatis.sqlmap.engine.impl.ExtendedSqlMapClient; import com.ibatis.sqlmap.engine.mapping.pa...
package com.buymobile.components.ibatis; import java.util.regex.Matcher; import java.util.regex.Pattern; public class SqlServer2005PageHepler { /** * 得到查询总数的sql */ /*public static String getCountString(String querySelect) { querySelect = getLineSql(querySelect); int orderIndex = getLastO...
package com.buymobile.components.ibatis; import com.ibatis.sqlmap.engine.mapping.statement.MappedStatement; import com.ibatis.sqlmap.engine.mapping.statement.SelectStatement; public class CountStatementHelper { public static final String SQL_COUNT_POSTFIX=".count"; public static MappedStatement createC...
package com.buymobile.components.ibatis; import org.hibernate.dialect.Dialect; public class SqlServer2005Dialect extends Dialect { protected static final String SQL_END_DELIMITER = ";"; public String getLimitString(String sql, boolean hasOffset) { return SqlServer2005PageHepler.getLimitString(sql,-1,...
package com.buymobile.components.ibatis; import java.util.regex.Matcher; import java.util.regex.Pattern; public class MySql5PageHepler { /** * 得到查询总数的sql */ public static String getCountString(String querySelect) { querySelect = getLineSql(querySelect); int orderIndex = getLastOrderInsertPo...
package com.buymobile.components.ibatis; import java.sql.Connection; import java.sql.SQLException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.hibernate.dialect.Dialect; import com.ibatis.sqlmap.engine.execution.SqlExecutor; import com.ibatis.sqlmap.engin...
package com.buymobile.components.page; import java.io.Serializable; import java.util.List; /** * <pre> * 用来在分页查询,其作用是将当前查询的某一页的信息, * 如上一页、下一页、总共多少页等信息存储下来,并提供友好的接口给用户 * 另外,也提供了转载用户序列化对象的把手:userObject * </pre> */ public class Page implements Serializable { /** * Comment for <code>serialVers...
package com.buymobile.components.page; import java.io.IOException; import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspWriter; import javax.servlet.jsp.tagext.TagSupport; public class PageTag extends TagSupport{ /** * serialVersionUID */ private static final long serialVersionUID ...
package com.buymobile.controller; /** * 首页登录,及退出,其中有部分包含页面的映射。 */ import java.io.IOException; import java.io.PrintWriter; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereot...
package com.buymobile.controller; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAt...
package com.buymobile.controller; import java.util.List; import org.springframework.beans.PropertyValue; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAtt...
package com.buymobile.controller; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.Request...
package com.buymobile.controller; import java.util.HashMap; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.spr...
package today; import java.io.IOException; class today { /** * @param args */ public static void main(String[] args) throws IOException { int x; System.out.println("***** result *****"); System.out.print("Input x== ?"); x = System.in.read() -'0'; if(x>0) System.out.println...
package study.mybatis.interceptor; import java.sql.Connection; import java.util.Properties; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.ibatis.executor.statement.StatementHandler; import org.apache.ibatis.mapping.BoundSql; import org.apache.ibatis....
package study.mybatis.main; import org.apache.ibatis.reflection.property.PropertyTokenizer; public class Main1 { /** * @param args */ public static void main(String[] args) { PropertyTokenizer pt = new PropertyTokenizer("user[i].department.code"); while(pt.hasNext()){ System.out.printf("name...
package study.mybatis.main; import java.io.IOException; import java.io.Reader; import java.util.List; import org.apache.ibatis.io.Resources; import org.apache.ibatis.mapping.MappedStatement; import org.apache.ibatis.session.RowBounds; import org.apache.ibatis.session.SqlSession; import org.apache.ibatis.ses...
package study.mybatis.profile; public class Main { /** * @param args * @throws InterruptedException */ public static void main(String[] args) throws InterruptedException { StringBuilder sb = new StringBuilder(); for(int i = 0 ; i < 500000; i++){ sb.append("nihao" + i + "you" ); } ...
package study.mybatis.dialect; /** * * @author tony.li * */ public class OracleDialect extends Dialect { public String getLimitString(String sql, int offset, int limit) { sql = sql.trim(); boolean isForUpdate = false; if (sql.toLowerCase().endsWith(" for update")) { sql = sql.subst...
package study.mybatis.dialect; public class MySql5Dialect extends Dialect{ protected static final String SQL_END_DELIMITER = ";"; public String getLimitString(String sql, boolean hasOffset) { return MySql5PageHepler.getLimitString(sql,-1,-1); } public String getLimitString(String sql, int offset...
package study.mybatis.dialect; public abstract class Dialect { public static enum Type{ MYSQL, ORACLE } public abstract String getLimitString(String sql, int skipResults, int maxResults); }
package study.mybatis.dialect; import java.util.regex.Matcher; import java.util.regex.Pattern; public class MySql5PageHepler { /** * 得到查询总数的sql */ public static String getCountString(String querySelect) { querySelect = getLineSql(querySelect); int orderIndex = getLastOrderInsertPoint(queryS...
package study.mybatis.po; import java.io.Serializable; public class User implements Serializable{ /** * */ private static final long serialVersionUID = -7458068073273177502L; private Integer id; private String name; private Department department; public Integer getId() { return i...
package study.mybatis.po; import java.io.Serializable; public class Department implements Serializable{ /** * serialVersionUID */ private static final long serialVersionUID = 9166543438209055808L; private Integer id; private String code; public Integer getId() { return id; } publ...
import java.util.Random; class sortArray { private int[] myArray; public sortArray() { System.out.println("Default Order:"); Random digit = new Random(); myArray = new int [10]; for ( int counter = 0 ; counter < 10 ; counter++ ) { myArray[counter] = 1 + digit.nextInt(10); } printEleme...
class myArrayList { private int[] myArray; private int size; public myArrayList( int value, int seed, int increment ) { myArray = new int [value]; size = value; for ( int counter = 0 ; counter < size ; counter++ ) { myArray[counter] = seed; seed += increment; } } public void printEleme...
class calculatorClass { int x; int y; public calculatorClass( int num1, int num2 ) { x = num1; y = num2; } public int addNumber() { return x + y; } public int subtractNumber() { return x - y; } public int multiplyNumber() { return x * y; } public int divideNumber() { return x / y...
import javax.swing.*; public class helloWorld { public static void main(String[] args) { JOptionPane.showMessageDialog( null, "Hello World!" ); } }
import javax.swing.*; public class oddEven { public static void main(String[] args) { int number; number = Integer.parseInt(JOptionPane.showInputDialog( null, "Please enter a number: " )); OddNumber ( number ); EvenNumber ( number ); } private static void OddNumber ( int num ) { ...
import javax.swing.*; public class userInput { public static void main(String[] args) { String num = ""; num = JOptionPane.showInputDialog(null, "Please enter your name:" ); JOptionPane.showMessageDialog(null, "Hi " + num + "!"); } }
class stackClass { private int maxSize; private char[] stackArray; private int top; public stackClass(int max) { maxSize = max; stackArray = new char[maxSize]; top = -1; } public void push(char j) { stackArray[++top] = j; } ...
import java.io.IOException; public class reverseStack { private String input; private String output; public reverseStack(String in) { input = in; } public String doRev() { int stackSize = input.length(); Stack theStack = new Stack(stackSize); for (int i = 0; i < in...
package CtrLayer; import static org.junit.Assert.*; import org.junit.After; import org.junit.Before; import org.junit.Test; /** * The test class OrdreCtrTest. * * @author (your name) * @version (a version number or a date) */ public class OrdreCtrTest { /** * Default constructor for test class Ordr...
package CtrLayer; import static org.junit.Assert.*; import org.junit.After; import org.junit.Before; import org.junit.Test; /** * The test class LagerCtrTest. * * @author (your name) * @version (a version number or a date) */ public class LagerCtrTest { /** * Default constructor for...
package CtrLayer; import ModelLayer.*; import java.util.*; public class OrdreCtr { private Ordre ordre; private OrdreCon ordrecon; private LagerCtr lagerCTR; private PersonCtr personCTR; public OrdreCtr() { ordrecon = OrdreCon.getInstance(); personCTR = personCTR....
package CtrLayer; import ModelLayer.*; import java.util.ArrayList; /** * Write a description of class PersonCtr here. * * @author (your name) * @version (a version number or a date) */ public class PersonCtr { private PersonCon personCon; private static PersonCtr instance; public P...
package CtrLayer; import static org.junit.Assert.*; import org.junit.After; import org.junit.Before; import org.junit.Test; /** * The test class PersonCtrTest. * * @author (your name) * @version (a version number or a date) */ public class PersonCtrTest { private CtrLayer.PersonCtr person...
package CtrLayer; import ModelLayer.*; import java.util.*; public class LagerCtr { private LagerCon lagerCon; private static LagerCtr instance;// singleton public LagerCtr() { lagerCon = lagerCon.getInstance(); } public static LagerCtr getInstance() { i...
package ModelLayer; import java.util.ArrayList; /** * Write a description of class Lager here. * * @author Dennis Biil * @version 07-12-12 */ public class Lager { // instance variables - replace the example below with your own private ArrayList<DelLager> delLager; private int lagerNR; ...
package ModelLayer; import java.util.*; /** * Write a description of class VareCon here. * * @author (your name) * @version (a version number or a date) */ public class LagerCon { private static LagerCon instance;//Singleton private ArrayList<Lager> lager; private Lager tmpLager; ...
package ModelLayer; import java.util.*; /** * Write a description of class Vare here. * * @author Dennis Biil, * @version 07-12-12 */ public class Vare { private ArrayList<Leverandoer> leverandoer; private String vareID; // Strejkode; private String serieNR; private String be...
package ModelLayer; import java.util.ArrayList; /** * Write a description of class Koekken here. * * @author (your name) * @version (a version number or a date) */ public class Koekken { // instance variables - replace the example below with your own private ArrayList<Vare> vareListe; ...
package ModelLayer; /** * Write a description of class Privat here. * * @author Dennis Biil * @version 10-12-12 */ public class Privat extends Kunde { // instance variables - replace the example below with your own /** * Constructor for objects of class Privat */ pu...
package ModelLayer; /** * Write a description of class Leverandoer here. * * @author Dennis Biil * @version 07-12-12 */ public class Leverandoer { // instance variables - replace the example below with your own private String cvrNR; private String navn; private String adresse; ...