Examples of EnumSerializable


Examples of com.urbanairship.datacube.serializables.EnumSerializable

                // One bucket type is the state where the user is currently located.
                switch(city) {
                    case PORTLAND:
                    case SALEM:
                        // These cities are in Oregon
                        mapBuilder.put(usState, new EnumSerializable(UsState.OREGON, 1));
                        break;
                    case SANFRANCISCO:
                    case SACRAMENTO:
                        // These cities are in California
                        mapBuilder.put(usState, new EnumSerializable(UsState.CALIFORNIA, 1));
                        break;
                    case OLYMPIA:
                    case SEATTLE:
                        // These cities are in Washington
                        mapBuilder.put(usState, new EnumSerializable(UsState.WASHINGTON, 1));
                        break;
                    default:
                        throw new RuntimeException("Unknown city " + city);
                }

                // The other bucket type is the city where the user is currently located.
                mapBuilder.put(usCity, new EnumSerializable(city, 1));

                return mapBuilder.build();
            }
View Full Code Here

Examples of com.urbanairship.datacube.serializables.EnumSerializable

            }

            @Override
            public CSerializable bucketForRead(Object coordinateField, BucketType bucketType) {
                if(coordinateField instanceof City) {
                    return new EnumSerializable((City)coordinateField, 1);
                } else if(coordinateField instanceof UsState) {
                    return new EnumSerializable((UsState)coordinateField, 1);
                } else {
                    throw new RuntimeException("Unrecognized object of type " +
                            coordinateField.getClass().getName());
                }
            }
View Full Code Here

Examples of com.urbanairship.datacube.serializables.EnumSerializable

                        ImmutableSetMultimap.builder();

                switch(deviceType) {
                    case HTC_MYTOUCH:
                    case SAMSUNG_GALAXY:
                        mapBuilder.put(osType, new EnumSerializable(OsManufacturer.ANDROID, 1));
                        break;
                    case IPAD:
                    case IPHONE:
                        mapBuilder.put(osType, new EnumSerializable(OsManufacturer.APPLE, 1));
                        break;
                }

                mapBuilder.put(deviceName, new EnumSerializable(deviceType, 1));
                return mapBuilder.build();
            }
View Full Code Here

Examples of com.urbanairship.datacube.serializables.EnumSerializable

            }

            @Override
            public CSerializable bucketForRead(Object coordinateField, BucketType bucketType) {
                if(coordinateField instanceof DeviceType) {
                    return new EnumSerializable((DeviceType)coordinateField, 1);
                } else if(coordinateField instanceof OsManufacturer) {
                    return new EnumSerializable((OsManufacturer)coordinateField, 1);
                } else {
                    throw new RuntimeException("Unexpected coordinate class " +
                            coordinateField.getClass());
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.