public void create(Connection connection, Relationshiptype relationshiptype) {
        PreparedStatement preparedstatement = null;
        try {
            Calendar calendar = Calendar.getInstance();
            calendar.set(1900, 0, 1);

            // PreparedStatements can use variables and are more efficient
            preparedstatement = connection.prepareStatement("insert into civicrm_relationship_type values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");

            preparedstatement.setString(1, relationshiptype.getName_a_b());
            preparedstatement.setString(2, relationshiptype.getLabel_a_b());
            preparedstatement.setString(3, relationshiptype.getName_b_a());
            preparedstatement.setString(4, relationshiptype.getLabel_b_a());
            preparedstatement.setString(5, relationshiptype.getDescription());
            String contact_type_a = "";
            switch (relationshiptype.getContact_type_a()) {
                case INDIVIDUAL:
                    contact_type_a = "Individual";
                    break;
                case ORGANIZATION:
                    contact_type_a = "Organization";
                    break;
                case HOUSEHOLD:
                    contact_type_a = "Household";
                    break;
                default:
                    break;
            }
            preparedstatement.setString(6, contact_type_a);
            String contact_type_b = "";
            switch (relationshiptype.getContact_type_b()) {
                case INDIVIDUAL:
                    contact_type_b = "Individual";
                    break;
                case ORGANIZATION:
                    contact_type_b = "Organization";
                    break;
                case HOUSEHOLD:
                    contact_type_b = "Household";
                    break;
                default:
                    break;
            }
            preparedstatement.setString(7, contact_type_b);
            preparedstatement.setString(8, relationshiptype.getContact_sub_type_a());
            preparedstatement.setString(9, relationshiptype.getContact_sub_type_b());
            preparedstatement.setBoolean(10, relationshiptype.isIs_reserved());
            preparedstatement.setBoolean(11, relationshiptype.isIs_active());

            preparedstatement.executeUpdate();
        } catch (SQLException ex) {
            Logger.getLogger(RelationshiptypeController.class.getName()).log(Level.SEVERE, null, ex);
        } finally {
            try {
                if (!preparedstatement.isClosed()) {
                    preparedstatement.close();
                }
            } catch (SQLException ex) {
                Logger.getLogger(AddressController.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }