This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
@Table(name = "movies") | |
public class Movie extends BaseModel { | |
@Column(nullable = false) | |
private String title; | |
private String description; | |
@Enumerated(value = EnumType.STRING) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AmazonTest { | |
public static void main(String[] args) { | |
String accessKeyId = "zzzzzzzzzzzzzzzzzz"; | |
String associateTag = "zzzzzzzzzzzzzzzzz"; | |
AmazonA2S service = new AmazonA2SClient(accessKeyId, associateTag); | |
ItemSearchRequest request = new ItemSearchRequest(); | |
request.setSearchIndex("DVD"); | |
request.setKeywords("Batman"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)paintScore:(NSInteger) playerScore withPosX:(CGFloat)posX withPosY:(CGFloat)posY { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[self paintScore:[round score] withPosX:baseX withPosY:baseY]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
new Striperbater().init(Resources.getResourceAsReader("SqlMapConfig.xml")); | |
Striperbater.requestInit(); | |
User user = new User(); | |
user.setUsername("gdboling"); | |
Striperbater.getSqlMapClient().insert("User.insertUser", user); | |
Striperbater.getSqlMapClient().commitTransaction(); | |
Striperbater.requestComplete(); | |
} catch (IOException e) { | |
e.printStackTrace(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class User { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SqlMapBaseDao<T, ID extends Serializable> extends SqlMapClientDaoSupport implements Dao<T, ID> { | |
private Class<T> entityClass; | |
@Autowired | |
@SuppressWarnings("unchecked") | |
public void init(SqlMapClient sqlMapClient) { | |
entityClass = (Class<T>) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0]; | |
setSqlMapClient(sqlMapClient); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Criteria crit = getSession().createCriteria(DashboardProject.class); | |
crit.createAlias("templateHistory", "th", CriteriaSpecification.INNER_JOIN); | |
crit.createAlias("health", "h"); | |
crit.add(eq("th.id", report.getTemplate().getId())); | |
for (StoredReportGlobalItem item : report.getStoredReportGlobalItems()) { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<!DOCTYPE sqlMap PUBLIC | |
"-//ibatis.apache.org//DTD SQL Map 2.0//EN" | |
"http://ibatis.apache.org/dtd/sql-map-2.dtd"> | |
<sqlMap namespace="User"> | |
<resultMap id="resultMap" class="com.oneupthis.dataAccess.model.User"> | |
<result property="id" column="id" javaType="int"/> | |
<result property="emailAddress" column="email_address"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getSqlMapClientTemplate().insert("User.insert", user); |
OlderNewer