java


using java in controller and slick


I want to use java in my playframework controller.
And Want to use slick for persisting data with slick.
I have the evolutions and all ready and slick mapping to a model as well but how to access the model with java?
class processDTO #Inject() (protected val dbConfigProvider: DatabaseConfigProvider) extends HasDatabaseConfigProvider[JdbcProfile]
with ProcessTemplatesComponent {
import driver.api._
private val processTemplates = TableQuery[ProcessTemplates]
def getAll(): Future[List[ProcessTemplatesModel]] = db.run { processTemplates.to[List].result }
}
Well....
YourScalaClass.scala
pakcage yourscalapackage
class YourScalaClass(s: String) {
def doSomethingAndReturnString(): String = "omg :: " + s
}
YourJavaClass.java
package yourjavapackage;
import yourscalapakcage.YourScalaClass;
public class YourJavaClass {
public void do() {
YourScalaClass ysc = new YourScalaClass("lol");
String str = ysc.doSomethingAndReturnString();
System.out.println(str);
}
}

Related Links

SunCertPathBuilderException => Maven JAXB2 generation with certificate
How to Create JavaFX 16 bit Greyscale Images
ArtifactTransferException: Failure to transfer org.springframework.data:spring-data-jpa:jar:1.7.0.RELEASE
Run mvn install on a cloned repo using chef
Inheritance in hibernates where parent class variable is only used by few child classes
Transform a list of maps to a map that uses ImmutablePair with Java 8 streams
Issue with Maven in installing the Software
Apache POI - Add image to comment
Error creating bean with name 'transactionManager' in spring 3.2.3.RELEASE+ Hibernate 4.1.9.Final + Dynamic web module 2.4
Tree structure JSON generation in Java
MD5 Binary String conversion to Byte Array
Time complexity of this code using Java 8 stream and predicate
Wifidirect Discovery not finding peers
While catching exeption why do we use the Exception's subclasses as the o/p clearly gives us the exact exception? [duplicate]
Maven info statement after command build
Pattern matching issue in Java

Categories

HOME
cakephp
google-chrome-extension
listview
hook
pypi
deezer
office365api
read-eval-print-loop
youtube-api-v3
google-project-tango
blueprintjs
mouse
contact
slurm
vifm
midi
dax
u-sql
quickbooks
nstableview
messages
designer
try-catch
beyondcompare
nhibernate-envers
contextmenu
jprofiler
conemu
filezilla
jspm
gsoap
lightswitch-2013
code-contracts
vsts-build-task
lxd
hybridauth
asset-pipeline
subset-sum
libvpx
unoconv
ncalc
grid.mvc
botbuilder
estimote
mime
vao
heightmap
.net-4.6.2
angular2-meteor
cubic-spline
qwt
long-polling
apache-fop
qsslsocket
nsarray
webdriverjs
background-service
angular-cache
probability-density
file-writing
angstrom-linux
python-stackless
hexdump
bluegiga
phpcas
qtableview
cyclomatic-complexity
computer-algebra-systems
graph-drawing
apache-commons-fileupload
iiviewdeckcontroller
key-management
clipperlib
jsapi
fscommand
gwidgets
java-metro-framework
castle
openexr
xceed-datagrid
aqtime
apc
quartz-graphics
dotnetnuke-5
flash-builder4.5
ril
interface-orientation
ember-app-kit
eventlistener
flashvars
angularjs-controller
simba
dmoz
unc
rdoc
automount
netdna-api
rfc1123
yslow
sudzc
gallio
dentrix
routedevent
msdev
dbisam

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App