This file contains hidden or 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
| // Create a sailboat named Stars and Stripes | |
| Sailboat sailboat = new Sailboat(); | |
| sailboat.setRegistrationCode("USA11"); | |
| sailboat.setName("Stars and Stripes"); | |
| // Create the list of crew members | |
| List<CrewMember> crew = new ArrayList<CrewMember>(); | |
| CrewMember skipper = new CrewMember(); | |
| skipper.setFirstName("Dennis"); |
This file contains hidden or 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
| manager.saveEntity(sailbaot); | |
| System.out.println("Sailboat " + sailboat.getName() + " has " sailboat.getCrew().size() + " crew members"); |
This file contains hidden or 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
| Sailboat savedSailboat = manager.findById("USA11"); | |
| System.out.println("Sailboat has " + savedSailboat.getCrew().size() + " crew members"); | |
| System.out.println(savedSailboat.getCrew(0).getFirstName() + " is the skipper on boat " + savedSailboat.getCrew(0).getSailboat().getName()); |
This file contains hidden or 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
| @Configuration | |
| @EnableAutoConfiguration | |
| @EnableWebMvc | |
| @ComponentScan(basePackages = {"com.onyx"}) | |
| @EnableTransactionManagement | |
| @PropertySource(value = {"classpath:application.properties", "file:${user.home}/onyx/database.properties"}, ignoreResourceNotFound = true) | |
| public class SampleServer extends DefaultOnyxDatabaseApplication | |
| { | |
| public SampleServer() | |
| { |
This file contains hidden or 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
| # database credentials | |
| onyx.database.location=${user.home}/.onyx/sandbox.web.oxd | |
| onyx.database.username=admin | |
| onyx.database.password=admin | |
| server.port=8080 | |
| # properties file location | |
| properties.file=${user.home}/onyx/database.properties | |
| properties.default.file=application.properties |
This file contains hidden or 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
| <groupId>com.onyxdevtools.samples</groupId> | |
| <artifactId>onyx-database-web-server</artifactId> | |
| <version>1.0.0</version> | |
| <packaging>jar</packaging> | |
| <name>onyx-database-web-server</name> | |
| <dependencies> | |
| <dependency> |
This file contains hidden or 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
| platform :ios, '8.0' | |
| inhibit_all_warnings! | |
| xcodeproj 'OnyxDatabaseExample/OnyxDatabaseExample' | |
| link_with 'OnyxDatabaseExample', 'OnyxDatabaseExampleTests', 'OnyxDatabaseExampleUITests' | |
| pod 'OnyxClient', :path => 'Pods/onyx-database-client-cocoapod' | |
| pod 'SVProgressHUD', :head |
This file contains hidden or 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
| pod install |
This file contains hidden or 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
| @interface AppDelegate () | |
| @property (nonatomic, strong) SWGPersistenceManagerApi* persistenceManager; | |
| @end | |
| @implementation AppDelegate | |
| - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { |
This file contains hidden or 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
| #import <Foundation/Foundation.h> | |
| #import "SWGObject.h" | |
| NS_ASSUME_NONNULL_BEGIN | |
| @interface Person : SWGObject | |
| @property (nullable, nonatomic, retain) NSString *firstName; | |
| @property (nullable, nonatomic, retain) NSString *lastName; | |
| @property (nullable, nonatomic, retain) NSNumber *personId; |