# Tuesday, November 28, 2006

See comments...

/**
* Iterates through all mapped Hibernate classes and attempts to select
* all for that table/class pair. If this test does not fail then this
* indicates that the hibernate mappings at the very minimum match the
* database schema.
*/

@Test
public void allHibernateMappingsWork()
{
    Configuration configuration = new Configuration();
    configuration.setProperty(Environment.SHOW_SQL, "true");
    
    SessionFactory sessionFactory = configuration.configure().buildSessionFactory();
    Session session = sessionFactory.openSession();
    
    Map metaData = sessionFactory.getAllClassMetadata();
    for (Iterator i = metaData.values().iterator(); i.hasNext();)
    {
        EntityPersister persister = (EntityPersister) i.next();
        String className = persister.getClassMetadata().getEntityName();
        String qry = "from " + className + " c";
        List result = session.createQuery(qry).list();
        assertTrue("No results for " + className, result.size() > 0);
    }
    
    session.close();
}

Tuesday, November 28, 2006 9:37:44 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
# Sunday, November 19, 2006
To turn on the touch screen feature of an emulator, go into C:\WTK25\wtklib\devices\[device]\ and open up the [device].properties file.  Set: touch_screen=true.

Sunday, November 19, 2006 2:20:40 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [1]  | 
# Friday, November 17, 2006
JXPath looks pretty useful.  It provides XPath syntax to query your POJOs - very similar to LINQ.

Friday, November 17, 2006 5:25:17 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
# Saturday, November 11, 2006
I'm in the middle of researching platforms to put together a speaking assitance program for my daughter who can only vocalize a handful of words.  It must be programmable (C++, C#, or Java), have a touch screen, and have audio capabilities.

Possible platforms:

1. Nintendo DS
2. Windows Mobile w/NET compact framework
3. Java ME (formerly J2ME)

Currently I'm leaning towards Java ME since I now work with Java at work and that seems to have the greatest market penetration.  It looks like the Palm Z22 may work, it seems to have a J2ME implementation and is cheap ($99).

Mentions IBM's J2ME for the Z22 http://blog.tmcnet.com/blog/tom-keating/technology-and-science/palm-tx-and-palm-z22-handhelds.asp\

Palm Z22 specs: http://www.palm.com/us/products/handhelds/z22/specs.epl

Intro to J2ME with a Palm device: http://www.devx.com/wireless/Article/31092

Java ME home: http://java.sun.com/javame/index.jsp

Looks like I'll need this installed on the Palm device: IBM WebSphere Everyplace Micro Environment for Palm OS Garnet (WEME) provides a MIDP2.0/CLDC 1.1 compliant run-time: http://www-306.ibm.com/software/wireless/weme/

Saturday, November 11, 2006 9:16:18 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
# Friday, November 03, 2006
I just installed P4Report, which basically gives you ODBC access to your Perforce depot - pretty cool.  I can now whip out a status report for the week:

select user, description, date from changes where user in ('joe', 'dave') and timestampdiff(4, date, curtime()) < 7 and P4OPTIONS='longdesc' order by user, date;

Friday, November 03, 2006 7:32:14 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
I don't hate Java, it's certainly leaps and bounds over Visual Basic and in a lot of ways C++, but after working in C# 2.0 for the past year...  Eck!

Things I wish Java had:
  • Better generic support - no erasure (screw backwards compatibility, do it right)
  • Operator overloading
  • Properties
  • Partial classes

There would much more to hate if I wasn't using Java 5.0.  Apparently autoboxing, something I take for granted in .NET, just got added to Java in the last release.

Friday, November 03, 2006 7:30:03 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |