TextField fClass = (TextField)bFieldset.getControl("classDescription");
NumberField fQtty = (NumberField)bFieldset.getControl("quantity");
ConnectionSource conn = (JdbcConnectionSource) GetConnection();
Author a = new Author();
if(fullNameArr.length > 1) {
a = a.getByFullName(conn, author, fullNameArr);
Integer author_id = a.getId();
if (author_id != 0 && author_id != null) {
if(fullNameArr.length > 2) {
if (!a.getLname().equalsIgnoreCase(fullNameArr[1]) ||
!a.getMname().equalsIgnoreCase(fullNameArr[2]) ||
!a.getName().equalsIgnoreCase(fullNameArr[0]))
author.update(a);
} else if (fullNameArr.length == 2) {
if (!a.getLname().equalsIgnoreCase(fullNameArr[1]) ||
!a.getName().equalsIgnoreCase(fullNameArr[0]))
author.update(a);
}
author.refresh(a);
} else {
a = new Author(fullNameArr);
author.create(a);
author.refresh(a);
}
}