Class: JavaMappingCalendar

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

Overview

struts jsp template for a Calendar datatype. A Calendar datatype is a calendar date, not including hours,minutes and seconds A Calendar is not to be mistaken for a TimeStamp NOTE:

"Date" datatype name is not used because it is ambiguous.
Calendar and TimeStamp are used instead

Constant Summary collapse

MATCHING_UML_NAME =
["Calendar"]

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)


234
235
236
237
238
# File 'lib/ontomde-uml2-java/javaMapping.rb', line 234

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



243
244
245
# File 'lib/ontomde-uml2-java/javaMapping.rb', line 243

def getJavaType
  return "java.util.Date"
end

#getValidationRegexpObject



240
241
242
# File 'lib/ontomde-uml2-java/javaMapping.rb', line 240

def getValidationRegexp
  return nil
end