Phil 4.12.12

8:00 – 12:30 CSIP

  • Started the day trying to hook up hibernate to the information_instance.TABLES table and got the following error:
  • This is attempting to use the following class
    package com.sample.information_schema;
    
    import java.math.BigInteger;
    import java.util.Date;
    
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.Table;
    import javax.persistence.Temporal;
    import javax.persistence.TemporalType;
    
    @Entity
    @Table(name = "TABLES")
    public class TableMySql {
    	@Column(name = "version")
    	private BigInteger version;
    
    	@Column(name = "table_rows")
    	private BigInteger table_rows;
    
    	@Column(name = "avg_row_length")
    	private BigInteger avg_row_length;
    
    	@Column(name = "data_length")
    	private BigInteger data_length;
    
    	@Column(name = "max_data_length")
    	private BigInteger max_data_length;
    
    	@Column(name = "index_length")
    	private BigInteger index_length;
    
    	@Column(name = "data_free")
    	private BigInteger data_free;
    
    	@Column(name = "auto_increment")
    	private BigInteger auto_increment;
    
    	@Column(name = "checksum")
    	private BigInteger checksum;
    
    	@Temporal(TemporalType.DATE)
    	@Column(name = "create_time")
    	private Date create_time;
    
    	@Temporal(TemporalType.DATE)
    	@Column(name = "update_time")
    	private Date update_time;
    
    	@Temporal(TemporalType.DATE)
    	@Column(name = "check_time")
    	private Date check_time;
    
    	@Column(name = "table_catalog")
    	private String table_catalog;
    
    	@Column(name = "table_schema")
    	private String table_schema;
    
    	@Column(name = "table_name")
    	private String table_name;
    
    	@Column(name = "table_type")
    	private String table_type;
    
    	@Column(name = "engine")
    	private String engine;
    
    	@Column(name = "row_format")
    	private String row_format;
    
    	@Column(name = "table_collation")
    	private String table_collation;
    
    	@Column(name = "create_options")
    	private String create_options;
    
    	@Column(name = "table_comment")
    	private String table_comment;
    
    	public BigInteger getVersion() {
    		return version;
    	}
    
    	public BigInteger getTable_rows() {
    		return table_rows;
    	}
    
    	public BigInteger getAvg_row_length() {
    		return avg_row_length;
    	}
    
    	public BigInteger getData_length() {
    		return data_length;
    	}
    
    	public BigInteger getMax_data_length() {
    		return max_data_length;
    	}
    
    	public BigInteger getIndex_length() {
    		return index_length;
    	}
    
    	public BigInteger getData_free() {
    		return data_free;
    	}
    
    	public BigInteger getAuto_increment() {
    		return auto_increment;
    	}
    
    	public BigInteger getChecksum() {
    		return checksum;
    	}
    
    	public Date getCreate_time() {
    		return create_time;
    	}
    
    	public Date getUpdate_time() {
    		return update_time;
    	}
    
    	public Date getCheck_time() {
    		return check_time;
    	}
    
    	public String getTable_catalog() {
    		return table_catalog;
    	}
    
    	public String getTable_schema() {
    		return table_schema;
    	}
    
    	public String getTable_name() {
    		return table_name;
    	}
    
    	public String getTable_type() {
    		return table_type;
    	}
    
    	public String getEngine() {
    		return engine;
    	}
    
    	public String getRow_format() {
    		return row_format;
    	}
    
    	public String getTable_collation() {
    		return table_collation;
    	}
    
    	public String getCreate_options() {
    		return create_options;
    	}
    
    	public String getTable_comment() {
    		return table_comment;
    	}
    }
  • to talk to hibernate using the following configuration file:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
    <session-factory name="MySqlInformationSchema">
    <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/information_schema</property>
    <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
    <property name="hibernate.connection.password">edge</property>
    <property name="hibernate.connection.username">root</property>
    <property name="hibernate.default_schema">information_schema</property>
    <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
    <property name="hbm2ddl.auto">update</property>
    <property name="show_sql">true</property>
    <property name="connection.pool_size">1</property>
    
    <!-- List all the annotated classes we're using -->
    <mapping class="com.sample.information_schema.tableMySql"/>
    
    </session-factory>
    </hibernate-configuration>
  • Well, connecting to the db with jdbc instead of running through Hibernate got things up to speed quite quickly. I am running arbitrary queries against the databases (including information_schema, which Hibernate chokes on). The results are wrapped in objects that rules can be run against.
    •  Handle what happens when a null is returned by WrappedMap.getObjectByName().
    • Determine primitive type and handle accordingly
  • Looks like my ability to charge the CSIP contract ran out on the 9th. Need to figure out what to do with the 12 hours I charged since then. Jim is working on it. Ok. Charge half of today and all of yesterday and stop.

12:30 – 4:30 FP

  • Worked on paper, then lost the ability to scroll past page one. Going to try this at home…

7:00 – 9:30 FP

  • Finished incorporating paper changes and sent back to Dr. Kuber.