Class: JavaMappingTimeStamp

Inherits:
JavaMapping show all
Includes:
Singleton
Defined in:
lib/ontomde-uml2-java/javaMapping.rb

Overview

struts jsp template for a timestamp datatype. A timestamp is a precise periode in time, including date,hours,minutes and seconds. NOTE:

"Date" datatype name is discourage because it is ambiguous.
(a java date is a timestamp)
Calendar and TimeStamp should be prefered.

Constant Summary collapse

MATCHING_UML_NAME =
["TimeStamp","Date"]

Instance Attribute Summary

Attributes inherited from JavaMapping

#maxStringLength

Instance Method Summary collapse

Methods inherited from JavaMapping

#getGroovyCast, #getMappings, #getTemplate, #initialize

Constructor Details

This class inherits a constructor from JavaMapping

Instance Method Details

#appliesTo?(datatype) ⇒ Boolean

MATCHING_JAVA_NAME=[]

Returns:

  • (Boolean)


210
211
212
213
214
# File 'lib/ontomde-uml2-java/javaMapping.rb', line 210

def appliesTo?(datatype)
  return true if MATCHING_UML_NAME.include?(datatype.uml_name_one)
  #return true if MATCHING_JAVA_NAME.include?(datatype.java_qualifiedName)
  return false
end

#getJavaTypeObject



218
219
220
# File 'lib/ontomde-uml2-java/javaMapping.rb', line 218

def getJavaType
  return "java.util.Date"
end

#getValidationRegexpObject



215
216
217
# File 'lib/ontomde-uml2-java/javaMapping.rb', line 215

def getValidationRegexp
  return nil
end