public class MMTUtil
{
private static Map<String, String> domainDocumentationMap = null;
static
{
domainDocumentationMap = new TreeMap<String, String>();
}
public static Map<String, String> getDomainDocumentationMap() {
return domainDocumentationMap;
}
public static void setDomainDocumentationMap(Map<String, String> domainDocumentationMap) {
MMTUtil.domainDocumentationMap = domainDocumentationMap;
}
你们能帮我理解这段代码吗?
如何使用此代码返回 domainComboDocumentationMap 和 domainComboDocumentationMap 以便我可以在另一个 java 文件中使用它?
Edit:
public UMRResultObject insertDocumentation(UMRDocumentationDTO documentationDTO)
{
Session session = UMRHibernateUtil.getUmrSession();
Transaction tx = null;
documentationLink = null;
objectName = null;
objectType = null;
try
{
tx = session.beginTransaction();
dao.insertDocumentation(documentationDTO, session);
********MMTUtil.getDomainDocumentationMap().put(objectName.getDomainName()+objectType.getDomainType(),documentationLink.getDocumentationLink());******
tx.commit();
ro.setSuccess(true);
ro.getMessages().add("Record Inserted Successfully");
}