<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    少年阿賓

    那些青春的歲月

      BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
      500 Posts :: 0 Stories :: 135 Comments :: 0 Trackbacks

    #

    構造方法摘要
    Object()
               
    方法摘要
    protected Object clone()
               創建并返回此對象的一個副本。
    boolean equals(Object obj)
               指示某個其他對象是否與此對象“相等”。
    protected void
    構造方法摘要
    Object()
               
    方法摘要
    protected Object clone()
               創建并返回此對象的一個副本。
    boolean equals(Object obj)
               指示某個其他對象是否與此對象“相等”。
    protected void finalize()
               當垃圾回收器確定不存在對該對象的更多引用時,由對象的垃圾回收器調用此方法。
    Class<? extends Object> getClass()
               返回一個對象的運行時類。
    int hashCode()
               返回該對象的哈希碼值。
    void notify()
               喚醒在此對象監視器上等待的單個線程。
    void notifyAll()
               喚醒在此對象監視器上等待的所有線程。
    String toString()
               返回該對象的字符串表示。
    void wait()
               導致當前的線程等待,直到其他線程調用此對象的 notify() 方法或 notifyAll() 方法。
    void wait(long timeout)
               導致當前的線程等待,直到其他線程調用此對象的 notify() 方法或 notifyAll() 方法,或者超過指定的時間量。
    void wait(long timeout, int nanos)
               導致當前的線程等待,直到其他線程調用此對象的 notify() 方法或 notifyAll() 方法,或者其他某個線程中斷當前線程,或者已超過某個實際時間量。

    構造方法詳細信息

    Object
    public Object()
    方法詳細信息

    getClass
    public final Class<? extends Object> getClass()
    返回一個對象的運行時類。該 Class 對象是由所表示類的 static synchronized 方法鎖定的對象。

    返回:
    表示該對象的運行時類的 java.lang.Class 對象。此結果屬于類型 Class<? extends X>,其中 X 表示清除表達式中的靜態類型,該表達式調用 getClass。

    --------------------------------------------------------------------------------

    hashCode
    public int hashCode()
    返回該對象的哈希碼值。支持該方法是為哈希表提供一些優點,例如,java.util.Hashtable 提供的哈希表。
    hashCode 的常規協定是:

    在 Java 應用程序執行期間,在同一對象上多次調用 hashCode 方法時,必須一致地返回相同的整數,前提是對象上 equals 比較中所用的信息沒有被修改。從某一應用程序的一次執行到同一應用程序的另一次執行,該整數無需保持一致。
    如果根據 equals(Object) 方法,兩個對象是相等的,那么在兩個對象中的每個對象上調用 hashCode 方法都必須生成相同的整數結果。
    以下情況不 是必需的:如果根據 equals(java.lang.Object) 方法,兩個對象不相等,那么在兩個對象中的任一對象上調用 hashCode 方法必定會生成不同的整數結果。但是,程序員應該知道,為不相等的對象生成不同整數結果可以提高哈希表的性能。
    實際上,由 Object 類定義的 hashCode 方法確實會針對不同的對象返回不同的整數。(這一般是通過將該對象的內部地址轉換成一個整數來實現的,但是 JavaTM 編程語言不需要這種實現技巧。)

    返回:
    此對象的一個哈希碼值。
    另請參見:
    equals(java.lang.Object), Hashtable

    --------------------------------------------------------------------------------

    equals
    public boolean equals(Object obj)
    指示某個其他對象是否與此對象“相等”。
    equals 方法在非空對象引用上實現相等關系:

    自反性:對于任何非空引用值 x,x.equals(x) 都應返回 true。
    對稱性:對于任何非空引用值 x 和 y,當且僅當 y.equals(x) 返回 true 時,x.equals(y) 才應返回 true。
    傳遞性:對于任何非空引用值 x、y 和 z,如果 x.equals(y) 返回 true,并且 y.equals(z) 返回 true,那么 x.equals(z) 應返回 true。
    一致性:對于任何非空引用值 x 和 y,多次調用 x.equals(y) 始終返回 true 或始終返回 false,前提是對象上 equals 比較中所用的信息沒有被修改。
    對于任何非空引用值 x,x.equals(null) 都應返回 false。
    Object 類的 equals 方法實現對象上差別可能性最大的相等關系;即,對于任何非空引用值 x 和 y,當且僅當 x 和 y 引用同一個對象時,此方法才返回 true(x == y 具有值 true)。

    注意:當此方法被重寫時,通常有必要重寫 hashCode 方法,以維護 hashCode 方法的常規協定,該協定聲明相等對象必須具有相等的哈希碼。

    本篇文章來源于:開發學院 http://edu.codepub.com   原文鏈接:http://edu.codepub.com/2009/1202/18394.php

    posted @ 2012-06-05 00:20 abin 閱讀(424) | 評論 (0)編輯 收藏

    Java程序員面試中的多線程問題
    http://sd.csdn.net/a/20120528/2806046.html 
    java中thread的start()和run()有何區別?
    http://zhidao.baidu.com/question/41360200.html
    什么是ThreadLocal
    http://www.cnblogs.com/cnblue/articles/2423756.html




    posted @ 2012-06-04 22:36 abin 閱讀(400) | 評論 (0)編輯 收藏

    OSWorkflow是一個靈活的工作流引擎,設計成可嵌入到企業應用程序中。它提供了許多的持久化API支持包括:EJB,Hibernate,JDBC和其它。OSWorkflow還可以與Spring集成。
    網址:http://www.opensymphony.com/osworkflow/

    1.OSWorkflow基本概念(gigix)
    http://gigix.blogdriver.com/gigix/113138.html
    2.osworkflow中文指南(Quake Wang)
    http://wiki.opensymphony.com/display/WF/Tutorial+-+Chinese
    3.OSWorkflow入門(史帝芬心得筆記)
    http://my.so-net.net.tw/idealist/OSWorkflow/
    4.英文文檔
    http://wiki.opensymphony.com/display/WF/Manual
    5.深入分析(銀狐999)
    http://blog.csdn.net/james999/category/52990.aspx


    其它關于osworkflow的文章

    http://captainandboat.spaces.live.com/blog/cns!9a3607f7808d2d0d!334.entry

    http://qinysong.iteye.com/blog/post/333919

    http://www.cnblogs.com/jssy/archive/2007/06/08/776175.html

    http://zhusl.blog.sohu.com/32223382.html


    posted @ 2012-06-03 23:16 abin 閱讀(472) | 評論 (0)編輯 收藏

    osworkflow.xml
    <osworkflow>
     <persistence class="com.opensymphony.workflow.spi.memory.MemoryWorkflowStore" />
     <factory class="com.opensymphony.workflow.loader.XMLWorkflowFactory">
      <property key="resource" value="workflows.xml" />
     </factory>
    </osworkflow>


    workflows.xml
    <workflows>
      <workflow name="docworkflow" type="resource" location="myworkflow.xml"/>
    </workflows>


    myworkflow.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE workflow PUBLIC "-//OpenSymphony Group//DTD OSWorkflow 2.6//EN" "<workflow>
     <registers>
      <register type="class" variable-name="log">
       <arg name="class.name">com.opensymphony.workflow.util.LogRegister</arg>
       <arg name="addInstanceId">true</arg>
      </register>
     </registers>

     <initial-actions>
      <action id="100" name="Start Ordinary Workflow">
       <results>
        <unconditional-result old-status="Finished"
         status="Queued" step="1" />
       </results>
      </action>
      <action id="200" name="Start Emergent Workflow">
       <results>
        <unconditional-result old-status="Finished"
         status="Queued" step="5" />
       </results>
      </action>
     </initial-actions>

     <steps>

      <step id="1" name="Initiate Doc">
       <actions>
        <action id="1" name="Initial Work">
         <restrict-to>
          <conditions>
           <condition type="class">
            <arg name="class.name">
             com.opensymphony.workflow.util.StatusCondition
            </arg>
            <arg name="status">Queued</arg>
           </condition>
          </conditions>
         </restrict-to>
         <validators>
          <validator type="class">
           <arg name="class.name">
            org.abin.lee.validator.TitleValidator
           </arg>
          </validator>
         </validators>
         <pre-functions>
          <function type="class">
           <arg name="class.name">
            com.opensymphony.workflow.util.Caller
           </arg>
           <arg name="stepId">1</arg>
          </function>
          <function type="beanshell">
           <arg name="script">
            transientVars.get("log").info("Initiate Work");
           </arg>
          </function>
         </pre-functions>
         <results>
          <unconditional-result old-status="Finished"
           status="Prepared" step="1" owner="${caller}" />
         </results>
         <post-functions>
          <function type="beanshell">
           <arg name="script">
            propertySet.setString("title",
            (String)transientVars.get("title"));
           </arg>
          </function>
         </post-functions>
        </action>
        <action id="2" name="Deliver Work">
         <restrict-to>
          <conditions type="AND">
           <condition type="class">
            <arg name="class.name">
             com.opensymphony.workflow.util.StatusCondition
            </arg>
            <arg name="status">Prepared</arg>
            <arg name="stepId">1</arg>
           </condition>
           <condition type="class">
            <arg name="class.name">
             com.opensymphony.workflow.util.AllowOwnerOnlyCondition
            </arg>
           </condition>
          </conditions>
         </restrict-to>
         <pre-functions>
          <function type="beanshell">
           <arg name="script">
            transientVars.get("log").info("Deliver Doc to Boss A and B");
           </arg>
          </function>
         </pre-functions>
         <results>
          <unconditional-result old-status="Finished"
           status="Prepared" split="1" />
         </results>
        </action>
       </actions>
      </step>

      <step id="2" name="Review Doc In Boss A">
       <external-permissions>
        <permission name="permA">
         <restrict-to>
          <conditions type="AND">
           <condition name="check.status" type="class">
            <arg name="class.name">com.opensymphony.workflow.util.StatusCondition</arg>
            <arg name="status">Prepared</arg>
           </condition>
           <condition name="allow.owner.only" type="class">
            <arg name="class.name">com.opensymphony.workflow.util.AllowOwnerOnlyCondition</arg>
           </condition>
          </conditions>
         </restrict-to>
        </permission>
       </external-permissions>
       <actions>
        <action id="3" name="Review Work By A">
         <pre-functions>
          <function type="beanshell">
           <arg name="script">
            transientVars.get("log").info("Doc Reviewed By Boss A")
           </arg>
          </function>
         </pre-functions>
         <results>
          <unconditional-result old-status="Finished"
           status="Underway" join="1" />
         </results>
        </action>
       </actions>
      </step>

      <step id="3" name="Review Doc In Boss B">
       <external-permissions>
        <permission name="permA">
         <restrict-to>
          <conditions type="AND">
           <condition name="check.status" type="class">
            <arg name="class.name">com.opensymphony.workflow.util.StatusCondition</arg>
            <arg name="status">Prepared</arg>
           </condition>
           <condition name="allow.owner.only" type="class">
            <arg name="class.name">com.opensymphony.workflow.util.AllowOwnerOnlyCondition</arg>
           </condition>
          </conditions>
         </restrict-to>
        </permission>
       </external-permissions>
       <actions>
        <action id="4" name="Review Work By B">
         <pre-functions>
          <function type="beanshell">
           <arg name="script">
            transientVars.get("log").info("Doc Reviewed By Boss B")
           </arg>
          </function>
         </pre-functions>
         <results>
          <unconditional-result old-status="Finished"
           status="Underway" join="1" />
         </results>
        </action>
       </actions>
      </step>

      <step id="4" name="Finish Ordinary Work">
       <pre-functions>
        <function type="beanshell">
         <arg name="script">
          System.out.println("Finish Doc Review. \nTitle:"+propertySet.getString("title")+".");
         </arg>
        </function>
       </pre-functions>
      </step>

      <step id="5" name="Finish Emergent Work">
       <pre-functions>
        <function type="beanshell">
         <arg name="script">
          System.out.println("Emergency Handler");
         </arg>
        </function>
       </pre-functions>
      </step>

     </steps>

     <splits>
      <split id="1">
       <unconditional-result old-status="Finished"
        status="Prepared" step="2" />
       <unconditional-result old-status="Finished"
        status="Prepared" step="3" />
      </split>
     </splits>

     <joins>
      <join id="1">
       <conditions type="AND">
        <condition type="beanshell">
         <arg name="script"><![CDATA[ "Finished".equals(jn.getStep(2).getStatus()) && "Finished".equals(jn.getStep(3).getStatus()) ]]></arg>
        </condition>
       </conditions>
       <unconditional-result old-status="Finished"
        status="Reviewed" step="4" />
      </join>
     </joins>

    </workflow>




    TitleValidator.java

    package org.abin.lee.validator;

    import java.util.Map;
    import com.opensymphony.module.propertyset.PropertySet;
    import com.opensymphony.workflow.InvalidInputException;
    import com.opensymphony.workflow.Validator;
    import com.opensymphony.workflow.WorkflowException;

    public class TitleValidator implements Validator {
     public void validate(Map transientVars, Map args, PropertySet ps)
       throws InvalidInputException, WorkflowException {
      System.out.println("TitleValidator is running");
      String title = (String) transientVars.get("title");
      if (title == null)
       throw new InvalidInputException("Missing title");
      if (title.length() > 30)
       throw new InvalidInputException("Title too long");
     }
    }



    SimpleSample.java

    package org.abin.lee.workflow;

    import java.util.HashMap;

    import com.opensymphony.workflow.InvalidActionException;
    import com.opensymphony.workflow.InvalidEntryStateException;
    import com.opensymphony.workflow.InvalidInputException;
    import com.opensymphony.workflow.InvalidRoleException;
    import com.opensymphony.workflow.Workflow;
    import com.opensymphony.workflow.WorkflowException;
    import com.opensymphony.workflow.basic.BasicWorkflow;
    import com.opensymphony.workflow.config.DefaultConfiguration;

    public class SimpleSample {
     public static void main(String[] args) {
      try {
       Workflow workflow = new BasicWorkflow("abin");

       DefaultConfiguration config = new DefaultConfiguration();
       workflow.setConfiguration(config);

       long workflowId = workflow.initialize("docworkflow", 100, null);
       HashMap inputs = new HashMap();
       inputs.put("title", "openopen");

       workflow.doAction(workflowId, 1, inputs);

       workflow.doAction(workflowId, 2, null);

       workflow.doAction(workflowId, 3, null);

       workflow.doAction(workflowId, 4, null);
       
      } catch (InvalidActionException e) {
       System.out.println(e.getMessage());
      } catch (InvalidRoleException e) {
       System.out.println(e.getMessage());
      } catch (InvalidInputException e) {
       System.out.println(e.getMessage());
      } catch (InvalidEntryStateException e) {
       System.out.println(e.getMessage());
      } catch (WorkflowException e) {
       System.out.println(e.getMessage());
      }
     }
    }




    log4j.properties

    log4j.rootCategory=info,log,console

    log4j.logger.org.apache.axis2.enterprise=FATAL
    log4j.logger.de.hunsicker.jalopy.io=FATAL
    log4j.logger.httpclient.wire.header=FATAL
    log4j.logger.org.apache.commons.httpclient=FATAL

    log4j.appender.console=org.apache.log4j.ConsoleAppender
    log4j.appender.console.layout=org.apache.log4j.PatternLayout
    log4j.appender.console.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
     
    log4j.appender.log=org.apache.log4j.DailyRollingFileAppender
    log4j.appender.log.File=logs/osworkflow.log
    log4j.appender.log.layout=org.apache.log4j.PatternLayout
    log4j.appender.log.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n




    http://blog.sina.com.cn/s/blog_544a96ce0100nvjy.html

    http://blog.csdn.net/tanruitian/article/details/498167

    http://www.cnblogs.com/jacky73/archive/2008/12/17/1357134.html

    posted @ 2012-06-03 22:39 abin 閱讀(1546) | 評論 (2)編輯 收藏

    CREATE TABLE `teacher` (
      `tid` int(11) NOT NULL AUTO_INCREMENT,
      `tname` varchar(100) DEFAULT NULL,
      PRIMARY KEY (`tid`)
    ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

     


    CREATE TABLE `student` (
      `sid` int(11) NOT NULL AUTO_INCREMENT,
      `sname` varchar(100) DEFAULT NULL,
      `teacherid` int(11) DEFAULT NULL,
      PRIMARY KEY (`sid`),
      KEY `ftid` (`teacherid`),
      CONSTRAINT `ftid` FOREIGN KEY (`teacherid`) REFERENCES `teacher` (`tid`)
    ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

     



    package org.abin.lee.bean;

    public class Student implements java.io.Serializable{
     
     private static final long serialVersionUID = 2664268794619785937L;
     private int sid;
     private String sname;
     private int teacherId;
     private Teacher teacher;
     
     public Student() {
     }

     public int getSid() {
      return sid;
     }

     public void setSid(int sid) {
      this.sid = sid;
     }

     public String getSname() {
      return sname;
     }

     public void setSname(String sname) {
      this.sname = sname;
     }

     public Teacher getTeacher() {
      return teacher;
     }

     public void setTeacher(Teacher teacher) {
      this.teacher = teacher;
     }

     public int getTeacherId() {
      return teacherId;
     }

     public void setTeacherId(int teacherId) {
      this.teacherId = teacherId;
     }
     
    }





    package org.abin.lee.bean;

    import java.util.ArrayList;
    import java.util.List;

    public class Teacher implements java.io.Serializable{
     
     private static final long serialVersionUID = -7053173500969534203L;
     private int tid;
     private String tname;
     private List<Student> student=new ArrayList<Student>();
     
     public Teacher() {
     }
     
     public int getTid() {
      return tid;
     }
     public void setTid(int tid) {
      this.tid = tid;
     }
     public String getTname() {
      return tname;
     }
     public void setTname(String tname) {
      this.tname = tname;
     }

     public List<Student> getStudent() {
      return student;
     }

     public void setStudent(List<Student> student) {
      this.student = student;
     }

     
    }





    StudentMapper.xml(org.abin.lee.bean)
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
    "<mapper namespace="org.abin.lee.dao.StudentDao">
      <parameterMap type="Student" id="parameterStudentMap">
        <parameter property="sid"/>
        <parameter property="sname"/>
        <parameter property="teacherId"/>
      </parameterMap>
       
      <insert id="insertStudent"    parameterMap="parameterStudentMap">
        <selectKey    keyProperty="sid" resultType="int" order="AFTER">
          SELECT LAST_INSERT_ID() AS ID
        </selectKey>
        INSERT INTO student(sname,teacherId)
        VALUES(#{sname},#{teacherId})
      </insert>   
       
      <resultMap type="Student" id="StudentMap">
        <result property="sid" column="sid"/>
        <result property="sname" column="sname"/>
        <result property="teacherId" column="teacherId"/>
        <association property="teacher" javaType="Teacher" column="teacherId" select="org.abin.lee.dao.TeacherDao.getTeacher"/>
      </resultMap>   
      <select id="getStudent" resultMap="StudentMap" parameterType="int">
        SELECT * FROM student
        WHERE sid=#{sid}
      </select>
       
      <select id="getStudentById" resultMap="StudentMap" parameterType="int">
        SELECT * FROM student
        WHERE teacherId=#{teacherId}
      </select>
     
     
    </mapper>  



    TeacherMapper.xml(org.abin.lee.bean)

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
    "
    <mapper namespace="org.abin.lee.dao.TeacherDao">
      <parameterMap type="Teacher" id="parameterTeacherMap">
        <parameter property="tid"/>
        <parameter property="tname"/>
      </parameterMap>

      <insert id="insertTeacher" parameterMap="parameterTeacherMap">
        <selectKey    keyProperty="tid" resultType="int" order="AFTER">
          SELECT @@IDENTITY AS ID
        </selectKey>
        INSERT INTO teacher(tname)
        VALUES(#{tname})
      </insert>       
       
      <resultMap type="Teacher" id="resultTeacherMap">
        <result property="tid" column="tid"/>
        <result property="tname" column="tname"/>
        <collection property="student" column="sid" select="org.abin.lee.dao.StudentDao.getStudentById"/>
      </resultMap>
       
      <select id="getTeacher" resultMap="resultTeacherMap" parameterType="int">
        SELECT *
        FROM teacher
        WHERE tid=#{id}
      </select>         
      
    </mapper>



    package org.abin.lee.dao;

    import java.util.List;

    import org.abin.lee.bean.Student;

    public interface StudentDao {
     void insertStudent(Student student);
     List<Student> getStudent(int id);
     List<Student> getStudentById(int teacherId);
    }




    package org.abin.lee.dao;

    import org.abin.lee.bean.Teacher;

    public interface TeacherDao {
     void insertTeacher(Teacher teacher);
     Teacher getTeacher(int id);
    }





    package org.abin.lee.dao.impl;

    import java.util.List;

    import org.abin.lee.bean.Student;
    import org.abin.lee.dao.StudentDao;
    import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

    public class StudentDaoImpl extends HibernateDaoSupport implements StudentDao{

     public List<Student> getStudent(int id) {
      List<Student> list=null;
      String hql="select o from Student o where o.id="+id;
      try {
       list=(List<Student>)this.getHibernateTemplate().find(hql);
      } catch (Exception e) {
       e.printStackTrace();
      }
      return list;
     }

     public List<Student> getStudentById(int teacherId) {
      List<Student> list=null;
      String hql="select o from Student o where o.id="+teacherId;
      try {
       list=(List<Student>)this.getHibernateTemplate().find(hql);
      } catch (Exception e) {
       e.printStackTrace();
      }
      return list;
     }

     public void insertStudent(Student student) {
      try {
       this.getHibernateTemplate().save(student);
      } catch (Exception e) {
       e.printStackTrace();
      }
      
     }

    }





    package org.abin.lee.dao.impl;

    import org.abin.lee.bean.Teacher;
    import org.abin.lee.dao.TeacherDao;
    import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

    public class TeacherDaoImpl extends HibernateDaoSupport implements TeacherDao{

     public Teacher getTeacher(int id) {
      Teacher teacher=null;
      String hql="select o from Teacher o where o.id="+id;
      try {
       teacher=(Teacher)this.getHibernateTemplate().find(hql);
       this.getHibernateTemplate().flush();
      } catch (Exception e) {
       e.printStackTrace();
      }
      return teacher;
     }

     public void insertTeacher(Teacher teacher) {
      try {
       this.getHibernateTemplate().save(teacher);
       this.getHibernateTemplate().flush();
       
      } catch (Exception e) {
       e.printStackTrace();
      }
      
     }

    }





    package org.abin.lee.service;

    import java.util.List;

    import org.abin.lee.bean.Student;

    public interface StudentService {
     
     void insertStudent(Student student);
     List<Student> getStudent(int id);
     List<Student> getStudentById(int teacherId);
     
    }




    package org.abin.lee.service;

    import org.abin.lee.bean.Teacher;

    public interface TeacherService {
     
     void insertTeacher(Teacher teacher);
     Teacher getTeacher(int id);
    }




    package org.abin.lee.service.impl;

    import java.util.List;

    import org.abin.lee.bean.Student;
    import org.abin.lee.dao.StudentDao;
    import org.abin.lee.service.StudentService;

    public class StudentServiceImpl implements StudentService{
     private StudentDao studentDao;
     
     public List<Student> getStudent(int id) {
      return this.studentDao.getStudent(id);
     }

     public List<Student> getStudentById(int teacherId) {
      
      return this.studentDao.getStudentById(teacherId);
     }

     public void insertStudent(Student student) {
      this.studentDao.insertStudent(student);
      
     }

     public StudentDao getStudentDao() {
      return studentDao;
     }

     public void setStudentDao(StudentDao studentDao) {
      this.studentDao = studentDao;
     }

    }




    package org.abin.lee.service.impl;

    import org.abin.lee.bean.Teacher;
    import org.abin.lee.dao.TeacherDao;
    import org.abin.lee.service.TeacherService;

    public class TeacherServiceImpl implements TeacherService{
     private TeacherDao teacherDao;
     
     public Teacher getTeacher(int id) {
      
      return this.teacherDao.getTeacher(id);
     }

     public void insertTeacher(Teacher teacher) {
      this.teacherDao.insertTeacher(teacher);
      
     }

     public TeacherDao getTeacherDao() {
      return teacherDao;
     }

     public void setTeacherDao(TeacherDao teacherDao) {
      this.teacherDao = teacherDao;
     }
     
    }





    applicationContext-mapper.xml(org.abin.lee.spring)

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="
     xmlns:xsi=" xmlns:context=" xmlns:aop=" xmlns:tx=" xsi:schemaLocation="
               
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
                http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
                http://www.springframework.org/schema/context

       <!--創建數據映射器,數據映射器必須為接口-->
     <bean id="studentDao"
      class="org.mybatis.spring.mapper.MapperFactoryBean">
      <property name="sqlSessionFactory" ref="sqlSessionFactory" />
      <property name="mapperInterface"
       value="org.abin.lee.dao.StudentDao" />
     </bean>
     
     <bean id="teacherDao"
      class="org.mybatis.spring.mapper.MapperFactoryBean">
      <property name="sqlSessionFactory" ref="sqlSessionFactory" />
      <property name="mapperInterface"
       value="org.abin.lee.dao.TeacherDao" />
     </bean>


    </beans>






    applicationContext-resource.xml(org.abin.lee.spring)

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="
     xmlns:xsi=" xmlns:context=" xmlns:aop=" xmlns:tx=" xsi:schemaLocation="
               
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
                http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
                http://www.springframework.org/schema/context


     <!--配置數據源 -->
     <bean id="dataSource"
      class="org.apache.commons.dbcp.BasicDataSource"
      destroy-method="close">
      <property name="driverClassName"
       value="com.mysql.jdbc.Driver">
      </property>
      <property name="url" value="jdbc:mysql://localhost:3306/abin"></property>
      <property name="username" value="root"></property>
      <property name="password" value=""></property>
      <property name="maxActive" value="100"></property>
      <property name="maxIdle" value="30"></property>
      <property name="maxWait" value="500"></property>
      <property name="defaultAutoCommit" value="true"></property>
     </bean>

        <!-- 創建SqlSessionFactory,同時指定數據源-->
     <bean id="sqlSessionFactory"
      class="org.mybatis.spring.SqlSessionFactoryBean">
      <property name="dataSource" ref="dataSource" />
      <property name="configLocation"
       value="classpath:mybatis-config.xml" />
     </bean>

     <bean id="transactionManager"
      class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
      <property name="dataSource" ref="dataSource" />
     </bean>


    </beans>







    applicationContext-service.xml(org.abin.lee.spring)

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="
     xmlns:xsi=" xmlns:context=" xmlns:aop=" xmlns:tx=" xsi:schemaLocation="
               
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
                http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
                http://www.springframework.org/schema/context

     <bean id="studentService"
      class="org.abin.lee.service.impl.StudentServiceImpl">
      <property name="studentDao">
       <ref bean="studentDao" />
      </property>
     </bean>

     <bean id="teacherService"
      class="org.abin.lee.service.impl.TeacherServiceImpl">
      <property name="teacherDao">
       <ref bean="teacherDao" />
      </property>
     </bean>

    </beans>





    mybatis-config.xml(直接放在src目錄下面)

    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD  Config 3.0//EN"              
    "
    <configuration>

     <settings>
      <!-- changes from the defaults for testing -->
      <setting name="cacheEnabled" value="false" />
      <setting name="useGeneratedKeys" value="true" />
      <setting name="defaultExecutorType" value="REUSE" />
     </settings>


     <typeAliases>
      <typeAlias type="org.abin.lee.bean.Student" alias="Student" />
      <typeAlias type="org.abin.lee.bean.Teacher" alias="Teacher" />
     </typeAliases>

     

     <mappers>
      <mapper resource="org/abin/lee/bean/StudentMapper.xml" />
      <mapper resource="org/abin/lee/bean/TeacherMapper.xml" />
     </mappers>


    </configuration>





    log4j.properties(直接放在src目錄下面)

    log4j.rootLogger=INFO,stdout,logfile
    //log4j.rootLogger=INFO,logfile

    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    log4j.appender.stdout.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss} [%c]-[%p] %m%n

    log4j.appender.logfile=org.apache.log4j.RollingFileAppender
    log4j.appender.logfile.File=../logs/contacts.log
    log4j.appender.logfile.MaxFileSize=2048KB
    log4j.appender.logfile.MaxBackupIndex=5
    log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
    log4j.appender.logfile.layout.ConversionPattern=[%-5p] %d{yyyy-MM-dd HH:mm:ss} (%c) - %m%n

     





    下面是測試代碼:

    package org.abin.lee.test;

    import junit.framework.TestCase;

    import org.abin.lee.bean.Student;
    import org.abin.lee.bean.Teacher;
    import org.abin.lee.service.StudentService;
    import org.abin.lee.service.TeacherService;
    import org.junit.Before;
    import org.springframework.context.ApplicationContext;
    import org.springframework.context.support.ClassPathXmlApplicationContext;

    public class TestStudent extends TestCase{
     
     private StudentService studentService;
     private TeacherService teacherService;
     private ApplicationContext context;
     @Before
     public void setUp(){
      String[] xml=new String[3];
      xml[0]="org/abin/lee/spring/applicationContext-resource.xml";
      xml[1]="org/abin/lee/spring/applicationContext-mapper.xml";
      xml[2]="org/abin/lee/spring/applicationContext-service.xml";
      context=new ClassPathXmlApplicationContext(xml);
     }
     
     public void testStudent(){
      Teacher tea=new Teacher();
      tea.setTname("steven");
      teacherService=(TeacherService)context.getBean("teacherService");
      this.teacherService.insertTeacher(tea);
      Student stu=new Student();
      stu.setSname("john");
      stu.setTeacherId(tea.getTid());
      studentService=(StudentService)context.getBean("studentService");
      this.studentService.insertStudent(stu);
     }
     public StudentService getStudentService() {
      return studentService;
     }
     public void setStudentService(StudentService studentService) {
      this.studentService = studentService;
     }
     public TeacherService getTeacherService() {
      return teacherService;
     }
     public void setTeacherService(TeacherService teacherService) {
      this.teacherService = teacherService;
     }
     
    }






    package org.abin.lee.test;

    import java.util.List;

    import junit.framework.TestCase;

    import org.abin.lee.bean.Student;
    import org.abin.lee.bean.Teacher;
    import org.abin.lee.service.StudentService;
    import org.abin.lee.service.TeacherService;
    import org.junit.Before;
    import org.junit.Test;
    import org.springframework.context.ApplicationContext;
    import org.springframework.context.support.ClassPathXmlApplicationContext;

    public class TestFind extends TestCase{
     private StudentService studentService;
     private TeacherService teacherService;
     private ApplicationContext context;
     @Before
     public void setUp(){
      String[] xml=new String[3];
      xml[0]="org/abin/lee/spring/applicationContext-resource.xml";
      xml[1]="org/abin/lee/spring/applicationContext-mapper.xml";
      xml[2]="org/abin/lee/spring/applicationContext-service.xml";
      context=new ClassPathXmlApplicationContext(xml);
     }
     @Test
     public void testFind(){
      teacherService=(TeacherService)context.getBean("teacherService");
      studentService=(StudentService)context.getBean("studentService");
      List<Student> list=this.studentService.getStudentById(4);
      Student stu=new Student();
      Teacher tea=new Teacher();
      for(int i=0;i<list.size();i++){
       System.out.println("666");
       stu=list.get(i);
       System.out.println("sid="+stu.getSid()+",sname="+stu.getSname()+",teacherid="+stu.getTeacherId());
       tea=stu.getTeacher();
       System.out.println("tid="+tea.getTid()+",tname="+tea.getTname());
      }
     }
     public StudentService getStudentService() {
      return studentService;
     }
     public void setStudentService(StudentService studentService) {
      this.studentService = studentService;
     }
     public TeacherService getTeacherService() {
      return teacherService;
     }
     public void setTeacherService(TeacherService teacherService) {
      this.teacherService = teacherService;
     }
     
    }



    1、運行調試常用命令

    • ./asterisk & #后臺啟動
    • ./asterisk -vvvc #啟動asterisk 并盡量多的在后臺顯示調試信息
    • ./asterisk -r #連接asterisk控制臺
    • set verbose #設置打印信息

    2、asterisk控制臺下常用命令

    • set reload #重新加載sip配置信息
    • sip set debug on #設置顯示更多的Sip信息
    • sip set debug off #關閉更多sip信息顯示
    • sip show channels #顯示活動的sip通道
    • sip show peers #顯示已定義的sip peer
    • dialplan show #顯示撥號方案
    • dialplan reload #重新加載撥號方案
    • stop gracefully #優雅的終止asterisk
    • stop now #立即停止asterisk
    • module show #顯示所有已加載模塊
    • module load xxxxx.so #加載xxxxx.so 模塊
    • module reload xxxx.so #重新加載xxxx.so
    • module unload xxxx.so #卸載xxxx.so模塊
    • core show applications #顯示所有的應用 如:Dial、Radius、Hangup、Answer等
    • core show channels #顯示所有的通話頻道
    • core show codecs #顯示所有支持的編解碼器
    • core show funcions #顯示所有的功能函數
    posted @ 2012-05-30 17:19 abin 閱讀(2840) | 評論 (0)編輯 收藏

    package org.abin.lee.file;

    import java.io.IOException;
    import java.util.ArrayList;
    import java.util.List;

    import junit.framework.TestCase;
    import net.sf.json.JSONObject;

    import org.apache.http.HttpEntity;
    import org.apache.http.HttpResponse;
    import org.apache.http.NameValuePair;
    import org.apache.http.client.ClientProtocolException;
    import org.apache.http.client.entity.UrlEncodedFormEntity;
    import org.apache.http.client.methods.HttpPost;
    import org.apache.http.impl.client.DefaultHttpClient;
    import org.apache.http.message.BasicNameValuePair;
    import org.apache.http.protocol.HTTP;
    import org.apache.http.util.EntityUtils;

    public class QueryCustomerManagerTestCase extends TestCase {
     
     private static final String jsonServerUrl = " 
     static DefaultHttpClient client = new DefaultHttpClient();

     public static String sendReq(String method, String jsonReq)
       throws ClientProtocolException, IOException {
      HttpPost post = new HttpPost(jsonServerUrl + method);
      List<NameValuePair> nvps = new ArrayList<NameValuePair>();
      nvps.add(new BasicNameValuePair("json", jsonReq));

      post.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));

      HttpResponse response = client.execute(post);
      HttpEntity entity = response.getEntity();
      String entityStr = EntityUtils.toString(entity);

      return entityStr;
     }

     /**
      * 查詢產品客戶經理接口
      */
     public void testQueryCustomerManager() throws ClientProtocolException,
       IOException {
      String jsonReq = "{" + "RequestID:'11111',"+ "ProductID:'SC9904348'," + "timestamp:'20120416121200',"
        + "Hashcode:'1324546asdfgfhr65432wsdfgt654eds'" + "}";

      String resStr = this.sendReq("query-customer-manager-json!queryCustomerManager.action", jsonReq);

      System.out.println(resStr);

      assertNotNull(resStr);
    //  JSONObject json = JSONObject.fromObject(resStr);
    //  assertNotNull(json.get("requestID"));
     }

    }


    // 上傳一般的參數
         public static String TestParam() throws HttpException, IOException {
         String url = "http://localhost:8080/IphoneTest/rece.do?method=receive";
         HttpClient client = new HttpClient();
         PostMethod postMethod = new PostMethod(url);
        
         // 填入各個表單域的值
         NameValuePair[] data = { new NameValuePair("username", "username"),
         new NameValuePair("passwd", "123456") };
         // 將表單的值放入postMethod中
         postMethod.setRequestBody(data);
         // 執行postMethod
         int status = client.executeMethod(postMethod);
         System.out.println(status + "--------狀態------------");
         if (status!= HttpStatus.SC_OK) {
             System.out.println("--------fail-------");
         } else if (status== HttpStatus.SC_OK) {
             String str=postMethod.getResponseBodyAsString();
             System.out.println("---------服務器返回值---------:"+str);
         }
            return null;

         }


    //上傳帶附件的參數:

    public static String ParamFile() {
            String path = "D:\\KuGou\\b.txt";
            File file = new File(path);
            if (!file.exists()) {
                return "文件不存在!";
            }
            String url = "http://localhost:8080/IphoneTest/rece.do?method=receive";
            PostMethod filePost = new PostMethod(url);
            try {
                
                //FilePart:用來上傳文件的類
                FilePart fp = new FilePart("file", file); //Part:類專門用來上傳文件,其子類  ,FilePart:用來上傳文件的類     StringPart:普通的文本參數
                System.out.println("---" + fp);
            
                fp.setContentType(MIME.getMIME(file.getName().substring(file.getName().lastIndexOf(".")+1)));
                
                //StringPart:普通的文本參數
                StringPart uname=new StringPart("username", "aa");            
                StringPart pass=new StringPart("password", "123456"); 

                Part[] parts = {uname,pass,fp}; 
                
               //對于MIME類型的請求,httpclient建議全用MulitPartRequestEntity進行包裝
                MultipartRequestEntity mre=new MultipartRequestEntity(parts,filePost.getParams());
                
                filePost.setRequestEntity(mre);
                
                HttpClient client = new HttpClient();
                client.getHttpConnectionManager().getParams().setConnectionTimeout(50000);// 設置連接時間
                int status = client.executeMethod(filePost);
                System.out.println(status + "--------------");
                if (status != HttpStatus.SC_OK) {
                    System.out.println(status + "--------------fail----");
                } else if (status == HttpStatus.SC_OK) {
                    String str = "";            
                    str = filePost.getResponseBodyAsString();
                    System.out.println(filePost.getResponseBodyAsString()+ "---------服務器返回值---------");
                }

            } catch (Exception e) {
                e.printStackTrace();
            }
            return null;
        }


    //同時上傳幾個附近

    public static String ParamFiles() {
            String path = "D:\\KuGou\\b.txt";
            String path2 = "D:\\KuGou\\a.txt";
            File file = new File(path);
            File file2=new File(path2);
            if (!file.exists()) {
                return "文件不存在!";
            }
            if (!file2.exists()) {
                return "文件不存在!";
            }
            String url = "http://localhost:8080/IphoneTest/rece.do?method=receive";
            PostMethod filePost = new PostMethod(url);
            try {
                
                //FilePart:用來上傳文件的類
                FilePart fp = new FilePart("file", file); //Part:類專門用來上傳文件,其子類  ,FilePart:用來上傳文件的類     StringPart:普通的文本參數
                FilePart fp2=new FilePart("file2", file2);
                System.out.println("---" + fp);
                fp.setContentType(MIME.getMIME(file.getName().substring(file.getName().lastIndexOf(".")+1)));
                
                //StringPart:普通的文本參數
                StringPart uname=new StringPart("username", "aa");            
                StringPart pass=new StringPart("password", "123456"); 
                Part[] parts = {uname,pass,fp,fp2}; 
                
                MultipartRequestEntity mre=new MultipartRequestEntity(parts,filePost.getParams());
                
                filePost.setRequestEntity(mre);
                
                HttpClient client = new HttpClient();
                client.getHttpConnectionManager().getParams().setConnectionTimeout(50000);// 設置連接時間
                int status = client.executeMethod(filePost);
                System.out.println(status + "--------------");
                if (status != HttpStatus.SC_OK) {
                    System.out.println(status + "--------------fail----");
                } else if (status == HttpStatus.SC_OK) {
                    String str = "";
                    str = filePost.getResponseBodyAsString();
                    System.out.println(filePost.getResponseBodyAsString()+ "---------服務器返回值---------");
                }

            } catch (Exception e) {
                e.printStackTrace();
            }
            return null;
        }


    測試:

    public static void main(String[] args) throws HttpException, IOException {
            // 上傳一般的參數
            TestParam();

            ParamFile();
            
            ParamFiles();
        
        }



    posted @ 2012-05-28 16:59 abin 閱讀(6336) | 評論 (0)編輯 收藏

         摘要: 1、異常的優點      如果沒有異常,在程序中,應當檢查每個命令的成功還是失敗,如   BEGIN   SELECT ...   -- check for ’no data found’ error   SELECT ...   -- check for ’no data foundR...  閱讀全文
    posted @ 2012-05-26 23:22 abin 閱讀(1768) | 評論 (0)編輯 收藏

    本文主要介紹Spring與Mybatis三種常用整合方法,需要的整合架包是mybatis-spring.jar,可通過鏈接
    http://code.google.com/p/mybatis/下載到。

      1、采用數據映射器(MapperFactoryBean)的方式,不用寫mybatis映射文件,采用注解方式提供相應的sql語句和輸入參數。
      (1)Spring配置文件:

       <!-- 引入jdbc配置文件 -->      

     <context:property-placeholder location="jdbc.properties"/>          

     <!--創建jdbc數據源 -->        

    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">         

     <property name="driverClassName" value="${driver}"/>        

      <property name="url" value="${url}"/>         

     <property name="username" value="${username}"/>         

     <property name="password" value="${password}"/>          

    <property name="initialSize" value="${initialSize}"/>          

    <property name="maxActive" value="${maxActive}"/>       

       <property name="maxIdle" value="${maxIdle}"/>          

    <property name="minIdle" value="${minIdle}"/>       

     </bean>        

      <!-- 創建SqlSessionFactory,同時指定數據源-->       

     <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">        

     <property name="dataSource" ref="dataSource" />         

    </bean>         

      <!--創建數據映射器,數據映射器必須為接口-->  

          <bean id="userMapper" class="org.mybatis.spring.mapper.MapperFactoryBean">        

     <property name="mapperInterface" value="com.xxt.ibatis.dbcp.dao.UserMapper" />       

      <property name="sqlSessionFactory" ref="sqlSessionFactory" />        

     </bean>         

     <bean id="userDaoImpl2" class="com.xxt.ibatis.dbcp.dao.impl.UserDaoImpl2">       

     <property name="userMapper" ref="userMapper"/>  

     </bean>  

     

    數據映射器UserMapper,代碼如下:

    public interface UserMapper {     
        @Select("SELECT * FROM user WHERE id = #{userId}")        
      User getUser(@Param("userId"long id);   
     }  
     
     
    dao接口類UserDao,代碼如下:
    Java代碼
    public interface UserDao {   
        public User getUserById(User user);  
     }  
     
    dao實現類UserDaoImpl2,,代碼如下:
    Java代碼
    public class UserDaoImpl2 implements UserDao {   
         private UserMapper userMapper;      
         public void setUserMapper(UserMapper userMapper) {       
          this.userMapper = userMapper;      
       }         
       public User getUserById(User user) {      
         return userMapper.getUser(user.getId());      
       }  
      }  
     
     
    2、采用接口org.apache.ibatis.session.SqlSession的實現類org.mybatis.spring.SqlSessionTemplate。
        mybatis中, sessionFactory可由SqlSessionFactoryBuilder.來創建。
    MyBatis-Spring 中,使用了SqlSessionFactoryBean來替代。
    SqlSessionFactoryBean有一個必須屬性dataSource,
    另外其還有一個通用屬性configLocation(用來指定mybatis的xml配置文件路徑)。
       (1)Spring配置文件:
    <!-- 創建SqlSessionFactory,同時指定數據源-->  
    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">     
     <property name="dataSource" ref="dataSource" />     
     <!-- 指定sqlMapConfig總配置文件,訂制的environment在spring容器中不在生效-->   
     <property  name="configLocation"  value="classpath:sqlMapConfig.xml"/>   
     <!--指定實體類映射文件,可以指定同時指定某一包以及子包下面的所有配置文件,mapperLocations和configLocation有一個即可,當需要為實體類指定別名時,可指定configLocation屬性,再在mybatis總配置文件中采用mapper引入實體類映射文件 -->  
      <!- - <property  name="mapperLocations"  value="classpath*:com/xxt/ibatis/dbcp/**/*.xml"/>  -->
     <bean>
      (2)mybatis總配置文件sqlMapConfig.xml:
    <configuration>    
     <typeAliases>     
      <typeAlias type="com.xxt.ibatis.dbcp.domain.User" alias="User" />   
     </typeAliases>     
    <mappers>      
      <mapper resource="com/xxt/ibatis/dbcp/domain/user.map.xml" />      
     </mappers>  
     </configuration> 
    (3)實體類映射文件user.map.xml:
    <mapper namespace="com.xxt.ibatis.dbcp.domain.User">       
     <resultMap type="User" id="userMap">         
      <id property="id" column="id" />        
       <result property="name" column="name" />        
       <result property="password" column="password" />      
         <result property="createTime" column="createtime" />     
       </resultMap>     
       <select id="getUser" parameterType="User" resultMap="userMap">     
         select * from user where id = #{id}        
    </select>  
     <mapper/> 
     (4)dao層接口實現類UserDaoImpl:
    Java代碼
    public class UserDaoImpl implements  UserDao  {  
        public SqlSessionTemplate sqlSession;    
          public User getUserById(User user) {     
         return (User)sqlSession.selectOne("com.xxt.ibatis.dbcp.domain.User.getUser", user); 
         }  
        public void setSqlSession(SqlSessionTemplate sqlSession) {       
        this.sqlSession = sqlSession;      }  
      }  
    3、采用抽象類org.mybatis.spring.support.SqlSessionDaoSupport提供SqlSession。
       (1)spring配置文件:
    Java代碼
    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">      
     <property name="dataSource" ref="dataSource" />     
     <property  name="configLocation"  value="classpath:sqlMapConfig.xml"/>     
     <!-- <property  name="mapperLocations"  value="classpath*:com/xxt/ibatis/dbcp/domain/user.map.xml"/   >  -->   
    </bean>    
      <bean id="sqlSession"     class="org.mybatis.spring.SqlSessionTemplate">         
     <constructor-arg index="0" ref="sqlSessionFactory" />   
     </bean>    
     <bean id="userDaoImpl3" class="com.xxt.ibatis.dbcp.dao.impl.UserDaoImpl3">     
     <!--注入SqlSessionTemplate實例 -->      
    <property name="sqlSessionTemplate" ref="sqlSession" />     
      <!--也可直接注入SqlSessionFactory實例,二者都指定時,SqlSessionFactory失效 -->     
     <!-- <property name="sqlSessionFactory" ref="sqlSessionFactory" />    -->  
     </bean>  
     
     (2) dao層接口實現類UserDaoImpl3:
       
    Java代碼
    public class UserDaoImpl3 extends SqlSessionDaoSupport implements UserDao {  
       public User getUserById(User user) {     
       return (User) getSqlSession().selectOne("com.xxt.ibatis.dbcp.domain.User.getUser", user);     
      }  
     
    posted @ 2012-05-25 13:53 abin 閱讀(58270) | 評論 (1)編輯 收藏

    僅列出標題
    共50頁: First 上一頁 38 39 40 41 42 43 44 45 46 下一頁 Last 
    主站蜘蛛池模板: 无码国产亚洲日韩国精品视频一区二区三区| 亚洲暴爽av人人爽日日碰| 波多野结衣免费视频观看| 99re6在线精品视频免费播放| 成人奭片免费观看| 国内少妇偷人精品视频免费| 国产成人va亚洲电影| 国产午夜亚洲不卡| 高清国语自产拍免费视频国产 | 午夜精品射精入后重之免费观看| 久久亚洲色WWW成人欧美| 亚洲一级大黄大色毛片| 久久国产亚洲高清观看| 好看的电影网站亚洲一区| 亚洲男人在线无码视频| 成人爱做日本视频免费| 精品一区二区三区免费视频| 精品亚洲成a人在线观看| 亚洲欧美日韩一区二区三区在线| 亚洲精品视频在线| 亚洲av午夜福利精品一区人妖| 国产国拍亚洲精品福利| 亚洲国产精品一区二区第一页免 | 成人免费视频试看120秒| 精品国产污污免费网站aⅴ| 99亚洲精品卡2卡三卡4卡2卡| 亚洲国产乱码最新视频| 久久久久se色偷偷亚洲精品av| 亚洲春黄在线观看| 久久亚洲AV成人无码软件| 久久夜色精品国产噜噜噜亚洲AV| 亚洲AV综合色一区二区三区| 亚洲国产精品无码久久久不卡| 日本免费人成黄页网观看视频| 大香人蕉免费视频75| 日本免费中文字幕| 久久久久久国产精品免费免费男同| 免费人成激情视频在线观看冫| 国产亚洲免费的视频看| 久久午夜伦鲁片免费无码| 7x7x7x免费在线观看|